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 <[email protected]> Authored: Sun Apr 2 22:54:45 2017 +0200 Committer: piotrz <[email protected]> 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; } }
