You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2022/05/26 03:45:32 UTC

[royale-asjs] 02/02: minor improvement

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

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 8877d0c660ebf434b4e290eb75452607a4e8b2ad
Author: greg-dove <gr...@gmail.com>
AuthorDate: Thu May 26 15:45:13 2022 +1200

    minor improvement
---
 frameworks/projects/XML/src/main/royale/XMLList.as | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/frameworks/projects/XML/src/main/royale/XMLList.as b/frameworks/projects/XML/src/main/royale/XMLList.as
index 4bf1808f1e..6900505f9c 100644
--- a/frameworks/projects/XML/src/main/royale/XMLList.as
+++ b/frameworks/projects/XML/src/main/royale/XMLList.as
@@ -618,12 +618,14 @@ package
 		{
 			if (list === undefined && _xmlArray.length == 0) return true;
 			if (list instanceof XMLList) {
-				var l:uint = _xmlArray.length;
-				var other:Array = (list as XMLList)._xmlArray;
-				if (other.length != l) return false;
+				if (list !== this) {
+					var l:uint = _xmlArray.length;
+					var other:Array = (list as XMLList)._xmlArray;
+					if (other.length != l) return false;
 
-				for (var i:uint=0;i<l;i++) {
-					if (!((_xmlArray[i] as XML).equals(other[i] as XML))) return false;
+					for (var i:uint=0;i<l;i++) {
+						if (!((_xmlArray[i] as XML).equals(other[i] as XML))) return false;
+					}
 				}
 				return true;
 			}