mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Correctly handle Item#insertChild(null)
This commit is contained in:
parent
a307bc4d14
commit
16105067bf
1 changed files with 1 additions and 1 deletions
|
@ -2106,7 +2106,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* possible.
|
* possible.
|
||||||
*/
|
*/
|
||||||
insertChild: function(index, item, _preserve) {
|
insertChild: function(index, item, _preserve) {
|
||||||
var res = this.insertChildren(index, [item], _preserve);
|
var res = item ? this.insertChildren(index, [item], _preserve) : null;
|
||||||
return res && res[0];
|
return res && res[0];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue