You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/04/18 06:17:30 UTC

[06/50] [abbrv] git commit: [flex-asjs] [refs/heads/dual] - Method getElementAt should return null if element not exists on JS sight

Method getElementAt should return null if element not exists on JS sight


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3d92c1c3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3d92c1c3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3d92c1c3

Branch: refs/heads/dual
Commit: 3d92c1c3a79f5a334d008f1b54d3b53048a93465
Parents: de48d63
Author: piotrz <pi...@apache.org>
Authored: Sun Apr 2 22:54:45 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Sun Apr 2 22:54:45 2017 +0200

----------------------------------------------------------------------
 .../projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3d92c1c3/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
index af9e255..ad4f999 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/core/UIBase.as
@@ -1087,6 +1087,11 @@ package org.apache.flex.core
             COMPILE::JS
             {
                 var children:Array = internalChildren();
+                if (children.length == 0)
+                {
+                    return null;
+                }
+
                 return children[index].flexjs_wrapper;
             }
         }