This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4c830d2  hasChildren calls getChildren an extra time
4c830d2 is described below

commit 4c830d2455d348abd8b7cda9b8cb994f997d20d3
Author: Harbs <[email protected]>
AuthorDate: Sat Jan 1 21:21:07 2022 +0200

    hasChildren calls getChildren an extra time
---
 .../src/main/royale/org/apache/royale/collections/FlattenedList.as    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/FlattenedList.as
 
b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/FlattenedList.as
index 13766e5..c6aa12c 100644
--- 
a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/FlattenedList.as
+++ 
b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/FlattenedList.as
@@ -201,8 +201,8 @@ package org.apache.royale.collections
                {
                        if (seeking == node) return depth;
                        
-                       if (hdata.hasChildren(node)) {
-                               var children:Array = hdata.getChildren(node) as 
Array;
+                       var children:Array = hdata.getChildren(node) as Array;
+                       if (children) {
                                var len:int = children.length;
                                for (var i:int=0; i < len; i++) {
                                        var newDepth:int = godeep(seeking, 
children[i], depth+1)

Reply via email to