Skip to content

Commit

Permalink
Prevent errors from being reported when comp.node is missing (cocos#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhefengzhang authored Mar 31, 2022
1 parent 10d2ac1 commit 793ed1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos2d/core/component-scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function stableRemoveInactive (iterator, flagToClear) {
var next = iterator.i + 1;
while (next < array.length) {
var comp = array[next];
if (comp._enabled && comp.node._activeInHierarchy) {
if (comp._enabled && comp.node && comp.node._activeInHierarchy) {
++next;
}
else {
Expand Down

0 comments on commit 793ed1e

Please sign in to comment.