Skip to content

Commit

Permalink
Fix valueOf() of empty XML elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Harbs committed Feb 20, 2018
1 parent 6a039fb commit 5fe8ee8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frameworks/projects/XML/src/main/royale/XML.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5fe8ee8

Please sign in to comment.