You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/07/25 14:53:50 UTC

[royale-asjs] branch develop updated: If adding new element, it should be appended

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 b8395af  If adding new element, it should be appended
b8395af is described below

commit b8395af84f658eb7506f7138e8d2a9c223867f8d
Author: Harbs <ha...@in-tools.com>
AuthorDate: Thu Jul 25 17:53:36 2019 +0300

    If adding new element, it should be appended
---
 frameworks/projects/XML/src/main/royale/XML.as | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/XML/src/main/royale/XML.as b/frameworks/projects/XML/src/main/royale/XML.as
index 42f576a..65e466d 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -2267,7 +2267,9 @@ package
 					// remove the children
 					// adjust the childIndexes
 				}
-				var curChild:XML = getChildren()[childIdx];
+				if(chldrn.length()){
+					var curChild:XML = getChildren()[childIdx];
+				}
 				// Now add them in.
 				len = elements.length();
 				for(i=0;i<len;i++)