From 16105067bf7f8e39e3f789f9a39faed6dfe86e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ju=CC=88rg=20Lehni?= Date: Sun, 28 Dec 2014 18:29:20 +0100 Subject: [PATCH] Correctly handle Item#insertChild(null) --- src/item/Item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index 6387b1d0..9532eac3 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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]; },