mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-14 00:39:57 -04:00
Filter out the insert parameter in _set for now, to prevent issues with cloning().
Work in progress.
This commit is contained in:
parent
b7aea1e527
commit
6af59f7adf
1 changed files with 3 additions and 1 deletions
|
@ -72,7 +72,9 @@ Base.inject(/** @lends Base# */{
|
|||
_set: function(props) {
|
||||
if (props && Base.isPlainObject(props)) {
|
||||
for (var key in props)
|
||||
if (props.hasOwnProperty(key) && key in this)
|
||||
// TODO: Filter out 'insert' parameter for now. This needs
|
||||
// proper handling in Item constructor instead.
|
||||
if (key !== 'insert' && props.hasOwnProperty(key) && key in this)
|
||||
this[key] = props[key];
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue