flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [11/31] git commit: [flex-asjs] [refs/heads/develop] - handle string tests
Date Tue, 09 Dec 2014 05:16:58 GMT
handle string tests


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

Branch: refs/heads/develop
Commit: 2e593054a1f4e301580a22362ff777879ae1db93
Parents: a61b76c
Author: Alex Harui <aharui@apache.org>
Authored: Fri Nov 21 16:47:18 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Dec 8 20:47:41 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2e593054/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index 19e9aa6..5c5d9a0 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -120,11 +120,14 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand)
{
       (leftOperand instanceof /** @type {Object} */(rightOperand))) {
     return true;
   }
+  if (typeof leftOperand === 'string')
+    return false; // right was not String otherwise exit above
   if (typeof leftOperand === 'number')
     return rightOperand === Number;
   if (rightOperand === Array && Array.isArray(leftOperand))
     return true;
-
+  if (leftOperand.FLEXJS_CLASS_INFO == undefined)
+    return false; // could be a function but not an instance
   if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
     if (checkInterfaces(leftOperand)) {
       return true;


Mime
View raw message