You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2021/01/23 14:46:40 UTC

[royale-asjs] branch develop updated: Fix arrayLike inserting undefined and non-existent data

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

yishayw 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 de1240f  Fix arrayLike inserting undefined and non-existent data
de1240f is described below

commit de1240ffc64427bc5051c649a6d0704ca3533797
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Sat Jan 23 16:46:26 2021 +0200

    Fix arrayLike inserting undefined and non-existent data
---
 .../src/main/royale/mx/controls/treeClasses/HierarchicalViewCursor.as | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalViewCursor.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalViewCursor.as
index 97969ca..3db48df 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalViewCursor.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalViewCursor.as
@@ -1009,6 +1009,10 @@ public class HierarchicalViewCursor extends EventDispatcher
         COMPILE::JS
         {
             var output:Array = [];
+	    if (collection.length == 0)
+	    {
+		    return output;
+	    }
             var cursor:IViewCursor = collection.createCursor();
             do {
                 output.push(cursor.current);