From 2d3200c8d7a1202c3713b024ec58c679234dc041 Mon Sep 17 00:00:00 2001 From: Clifford Champion Date: Sat, 27 Jul 2013 23:47:49 -0700 Subject: [PATCH] Fix to #263: _children undefined inside call to myShape.isEmpty(). --- 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 a6620f64..3bb0426b 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -774,7 +774,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ * @type Boolean */ isEmpty: function() { - return this._children.length == 0; + return !this._children || this._children.length == 0; } }, Base.each(['getBounds', 'getStrokeBounds', 'getHandleBounds', 'getRoughBounds'], function(name) {