Procházet zdrojové kódy

Update babylon.node.ts

Revising the getChildren (again?), for some reason this was rewritten.
Raanan Weber před 9 roky
rodič
revize
c2e1ac238e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/babylon.node.ts

+ 1 - 1
src/babylon.node.ts

@@ -186,7 +186,7 @@
         public _getDescendants(list: Node[], results: Node[], directDecendantsOnly: boolean = false, predicate?: (node: Node) => boolean): void {
             for (var index = 0; index < list.length; index++) {
                 var item = list[index];
-                if (((directDecendantsOnly && item.parent === this) || (!directDecendantsOnly && item.isDescendantOf(this))) && (predicate === null || predicate(item))) {
+                if (((directDecendantsOnly && item.parent === this) || (!directDecendantsOnly && item.isDescendantOf(this))) && (!predicate || predicate(item))) {
                     results.push(item);
                 }
             }