add safe check for activeObject

This commit is contained in:
Andrea Bogazzi 2017-02-19 23:52:53 -05:00 committed by GitHub
parent 214a169767
commit 22465346fc

View file

@ -501,7 +501,7 @@
if (target !== this.getActiveGroup() && target !== activeObject) {
this.deactivateAll();
if (target.selectable) {
activeObject.fire('deselected', { e: e });
activeObject && activeObject.fire('deselected', { e: e });
this.setActiveObject(target, e);
}
}