We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fa513c commit f7a08bbCopy full SHA for f7a08bb
cocos2d/base_nodes/CCNode.js
@@ -1026,7 +1026,9 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1026
*/
1027
removeFromParent:function (cleanup) {
1028
if (this._parent) {
1029
- cleanup = cleanup || true;
+ if (cleanup == null){
1030
+ cleanup = true;
1031
+ }
1032
this._parent.removeChild(this, cleanup);
1033
}
1034
},
@@ -1051,7 +1053,9 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{
1051
1053
return;
1052
1054
1055
1056
1057
1058
1059
if (this._children.indexOf(child) > -1) {
1060
this._detachChild(child, cleanup);
1061
0 commit comments