flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [09/50] [abbrv] git commit: [flex-asjs] [refs/heads/master] - looks like we get '' (empty string) sometimes which coerces to 0. We want it to be NaN
Date Mon, 26 Jun 2017 16:55:44 GMT
looks like we get '' (empty string) sometimes which coerces to 0.  We want it to be NaN


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/44e236a7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/44e236a7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/44e236a7

Branch: refs/heads/master
Commit: 44e236a7cdbabb7e3b1609fe66297a97d701dc9c
Parents: c5fa72c
Author: Alex Harui <aharui@apache.org>
Authored: Mon Jun 5 23:49:39 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Jun 5 23:49:39 2017 -0700

----------------------------------------------------------------------
 .../projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/44e236a7/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
index d0e8528..b3d9ba6 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
@@ -371,6 +371,8 @@ package org.apache.flex.core
             var strpixels:String = positioner.style.width as String;
             if (strpixels !== null && strpixels.indexOf('%') != -1)
                 pixels = NaN;
+            else if (strpixels.length == 0)
+            	pixels = NaN;
             else
                 pixels = parseFloat(strpixels);
             if (isNaN(pixels)) {
@@ -463,6 +465,8 @@ package org.apache.flex.core
             var strpixels:String = positioner.style.height as String;
             if (strpixels !== null && strpixels.indexOf('%') != -1)
                 pixels = NaN;
+            else if (strpixels.length == 0)
+            	pixels = NaN;
             else
                 pixels = parseFloat(strpixels);
             if (isNaN(pixels)) {


Mime
View raw message