mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-11 05:29:13 -04:00
Improve Node's Base.isPlainObject() to rule out arrays.
This commit is contained in:
parent
e9fb78aa08
commit
e2f4eb5a56
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ options.version = parseFloat(json.version.replace(/(.)(\d)$/, '$2'));
|
|||
// current one.
|
||||
var Base = context.Base;
|
||||
Base.isPlainObject = function(obj) {
|
||||
return Object(obj) === obj && (!(obj instanceof Base)
|
||||
return Object(obj) === obj && !Array.isArray(obj) && (!(obj instanceof Base)
|
||||
|| Object.getPrototypeOf(obj) === Base.prototype);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue