Correctly handle Item#insertChild(null)

This commit is contained in:
Jürg Lehni 2014-12-28 18:29:20 +01:00
parent a307bc4d14
commit 16105067bf

View file

@ -2106,7 +2106,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
* possible.
*/
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];
},