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 2014/12/09 06:16:58 UTC

[11/31] git commit: [flex-asjs] [refs/heads/develop] - handle string tests

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 <ah...@apache.org>
Authored: Fri Nov 21 16:47:18 2014 -0800
Committer: Alex Harui <ah...@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;