Rely on new Array.isArray() now for array checks.

This commit is contained in:
Jürg Lehni 2011-02-15 23:15:13 +00:00
parent b8816a07f5
commit 9d1458e6ae
3 changed files with 3 additions and 6 deletions
src/basic

View file

@ -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') {