mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Fix Base.read() to support alternative objcets returned by initialize().
This commit is contained in:
parent
fb547a758f
commit
bbf19840d3
1 changed files with 2 additions and 4 deletions
6
lib/bootstrap.js
vendored
6
lib/bootstrap.js
vendored
|
@ -205,11 +205,9 @@ new function() {
|
|||
return args[index];
|
||||
} else if (length != 0) {
|
||||
var obj = new this(this.dont);
|
||||
if (!obj.initialize)
|
||||
debugger;
|
||||
obj.initialize.apply(obj, index > 0 || length < args.length
|
||||
obj = obj.initialize.apply(obj, index > 0 || length < args.length
|
||||
? Array.prototype.slice.call(args, index, index + length)
|
||||
: args);
|
||||
: args) || obj;
|
||||
return obj;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue