You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/06/26 17:50:44 UTC

[07/50] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - looks like we get '' (empty string) sometimes which coerces to 0. We want it to be NaN

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/develop
Commit: 44e236a7cdbabb7e3b1609fe66297a97d701dc9c
Parents: c5fa72c
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jun 5 23:49:39 2017 -0700
Committer: Alex Harui <ah...@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)) {