flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [37/50] git commit: [flex-asjs] [refs/heads/develop] - handle more cases
Date Thu, 25 Sep 2014 16:04:19 GMT
handle more cases


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

Branch: refs/heads/develop
Commit: e4d65e296730d4c33f64ad5e5211f40b238c9cf0
Parents: b5d9be8
Author: Alex Harui <aharui@apache.org>
Authored: Tue Sep 23 14:34:50 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Sep 23 15:01:31 2014 -0700

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e4d65e29/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 16e85a7..099a0a4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -120,10 +120,10 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand)
{
       (leftOperand instanceof /** @type {Object} */(rightOperand))) {
     return true;
   }
-  if ((rightOperand === Number && typeof leftOperand === 'number') ||
-    (leftOperand instanceof /** @type {Object} */(rightOperand))) {
+  if (typeof leftOperand === 'number')
+    return rightOperand === Number;
+  if (rightOperand === Array && Array.isArray(leftOperand))
     return true;
-  }
 
   if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
     if (checkInterfaces(leftOperand)) {


Mime
View raw message