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 64eb735 children should only include elements
64eb735 is described below
commit 64eb73564aa9f3186477416cee575ceed1625cf9
Author: Harbs <[email protected]>
AuthorDate: Wed Jul 3 16:28:59 2019 +0300
children should only include elements
---
frameworks/projects/XML/src/main/royale/XML.as | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/XML/src/main/royale/XML.as
b/frameworks/projects/XML/src/main/royale/XML.as
index 4945147..42f576a 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -730,7 +730,7 @@ package
var childType:String = typeof child;
if(childType != "object") {
- var last:uint = childrenLength();
+ var last:uint = childrenLength();
const lastChild:XML = last ? _children[last-1]
: null;
if (lastChild && lastChild.nodeKind() ==
'element') {
@@ -902,7 +902,10 @@ package
var list:XMLList = new XMLList();
var len:int = childrenLength();
for(i=0;i<len;i++)
- list.append(_children[i]);
+ {
+ if(_children[i].nodeKind() == "element")
+ list.append(_children[i]);
+ }
list.targetObject = this;
return list;