mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-26 21:59:46 -04:00
Rely on new Array.isArray() now for array checks.
This commit is contained in:
parent
b8816a07f5
commit
9d1458e6ae
3 changed files with 3 additions and 6 deletions
src/basic
|
@ -13,7 +13,7 @@ var Size = Base.extend({
|
|||
} else if (arg.x !== undefined) {
|
||||
this.width = arg.x;
|
||||
this.height = arg.y;
|
||||
} else if (arg.length !== undefined) { // TODO: Array check
|
||||
} else if (Array.isArray(arg)) {
|
||||
this.width = arg[0];
|
||||
this.height = arg.length > 1 ? arg[1] : arg[0];
|
||||
} else if (typeof arg === 'number') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue