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/02/11 18:36:51 UTC

[royale-asjs] branch develop updated: Number(“ “) becomes 0…

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 e02f896  Number(“ “) becomes 0…
e02f896 is described below

commit e02f896f3510a90aff00d852dac4401e2705fcf3
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Feb 11 20:36:41 2019 +0200

    Number(“ “) becomes 0…
---
 frameworks/projects/XML/src/main/royale/XML.as | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/XML/src/main/royale/XML.as b/frameworks/projects/XML/src/main/royale/XML.as
index 0866ca5..a4984cd 100644
--- a/frameworks/projects/XML/src/main/royale/XML.as
+++ b/frameworks/projects/XML/src/main/royale/XML.as
@@ -2699,7 +2699,10 @@ package
 			if(str == "")
 				return str;
 			var num:Number = Number(str);
-			return isNaN(num) ? str : num;
+			if("" + num == str){
+				return  num;
+			}
+			return str;
 		}
 
 		////////////////////////////////////////////////////////////////