royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [royale-asjs] 01/02: Fix valueOf() of empty XML elements
Date Tue, 20 Feb 2018 09:39:46 GMT
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

commit 5fe8ee8730cc509f6d03b6e756076bed76af6ec4
Author: Harbs <harbs@in-tools.com>
AuthorDate: Tue Feb 20 11:39:18 2018 +0200

    Fix valueOf() of empty XML elements
---
 frameworks/projects/XML/src/main/royale/XML.as | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frameworks/projects/XML/src/main/royale/XML.as b/frameworks/projects/XML/src/main/royale/XML.as
index 46cc802..4934521 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -2644,6 +2644,8 @@ package
 		override public function valueOf():*
 		{
 			var str:String = this.toString();
+			if(str == "")
+				return str;
 			var num:Number = Number(str);
 			return isNaN(num) ? str : num;
 		}

-- 
To stop receiving notification emails like this one, please contact
harbs@apache.org.

Mime
View raw message