mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-05 09:43:58 -04:00
Use direct constructor instead of #initialize().
This commit is contained in:
parent
52c889428b
commit
9c5416360c
1 changed files with 2 additions and 2 deletions
|
@ -382,10 +382,10 @@ Base.inject(/** @lends Base# */{
|
||||||
data.dictionary = res[0];
|
data.dictionary = res[0];
|
||||||
} else if (type) {
|
} else if (type) {
|
||||||
// Create serialized type and pass collected arguments to
|
// Create serialized type and pass collected arguments to
|
||||||
// #initialize().
|
// constructor().
|
||||||
var args = res;
|
var args = res;
|
||||||
res = Base.create(type);
|
res = Base.create(type);
|
||||||
res.initialize.apply(res, args);
|
type.apply(res, args);
|
||||||
}
|
}
|
||||||
} else if (Base.isPlainObject(obj)) {
|
} else if (Base.isPlainObject(obj)) {
|
||||||
res = {};
|
res = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue