This is an automated email from the ASF dual-hosted git repository.
yishayw 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 e8ae8f2 Fix implicit coercion to Number error
e8ae8f2 is described below
commit e8ae8f292d110c1c31b6d026560c7588c8273a85
Author: Yishay Weiss <[email protected]>
AuthorDate: Sun Jan 3 22:18:55 2021 +0200
Fix implicit coercion to Number error
---
.../projects/SparkRoyale/src/main/royale/spark/primitives/Line.as | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
index a87bb28..6bb64a1 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/primitives/Line.as
@@ -421,8 +421,9 @@ public class Line extends UIComponent
var isDiagonal:Boolean = hasWidth && hasHeight;
if (isDiagonal)
{
- realXFrom = isNaN(right) ? 0 :
unscaledWidth;
- realXTo = isNaN(right) ? unscaledWidth
: 0;
+ var isRightDefined:Boolean = (right is
String) && (right as String).indexOf(":") > -1;
+ realXFrom = isRightDefined ? 0 :
unscaledWidth;
+ realXTo = isRightDefined ?
unscaledWidth : 0;
realYFrom = 0;
realYTo = unscaledHeight;
} else