mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Change Base.merge so that it produces a new hash and merges all passed hashes into it in sequence.
This commit is contained in:
parent
3aff54517e
commit
54964907dd
1 changed files with 6 additions and 4 deletions
|
@ -99,10 +99,12 @@ this.Base = Base.inject({
|
|||
}
|
||||
},
|
||||
|
||||
merge: function(dest, src) {
|
||||
return Base.each(src, function(value, key) {
|
||||
this[key] = value;
|
||||
}, dest);
|
||||
merge: function() {
|
||||
return Base.each(arguments, function(hash) {
|
||||
Base.each(hash, function(value, key) {
|
||||
this[key] = value;
|
||||
}, this);
|
||||
}, {}, true); // Pass true for asArray.
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue