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/03/21 19:55:53 UTC

[07/10] git commit: [flex-asjs] [refs/heads/develop] - fix parent in reverting states

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 <ah...@apache.org>
Authored: Fri Mar 21 08:20:11 2014 -0700
Committer: Alex Harui <ah...@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);