fix scene reloading (#2660)

This commit is contained in:
Jare Guo
2018-05-10 14:59:21 +08:00
committed by pandamicro
parent 04d8a432f6
commit 8d9fc58a6a
+3 -1
View File
@@ -510,7 +510,9 @@ var Component = cc.Class({
this.node._removeComponent(this);
if (CC_EDITOR || CC_TEST) {
delete cc.engine.attachedObjsForEditor[this._id];
if (cc.engine.attachedObjsForEditor[this._id] === this) { // temporarily fix
delete cc.engine.attachedObjsForEditor[this._id];
}
}
},