flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [07/10] git commit: [flex-asjs] [refs/heads/develop] - fix parent in reverting states
Date Fri, 21 Mar 2014 18:55:53 GMT
fix parent in reverting states


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

Branch: refs/heads/develop
Commit: f988f2bb8359c16342aa5cdd1228a5cf13e46b7f
Parents: ff8479f
Author: Alex Harui <aharui@apache.org>
Authored: Fri Mar 21 08:20:11 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Mar 21 08:20:11 2014 -0700

----------------------------------------------------------------------
 .../FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f988f2bb/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index f524bc0..dc080c4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -117,10 +117,13 @@ org.apache.flex.core.SimpleStatesImpl.prototype.revert_ = function(s)
{
       for (q in o.items) {
         item = o.items[q];
 
-        if (typeof(o.document['get_' + o.destination]) === 'function') {
-          parent = o.document['get_' + o.destination]();
-        } else {
-          parent = o.document[o.destination];
+        parent = o.document;
+        if (o.destination) {
+          if (typeof(o.document['get_' + o.destination]) === 'function') {
+            parent = o.document['get_' + o.destination]();
+          } else {
+            parent = o.document[o.destination];
+          }
         }
 
         parent.removeElement(item);


Mime
View raw message