Skip to content

Commit

Permalink
fix: fixing invocation order of unpiping in faPipeFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
stristr authored and zackbrown committed May 29, 2014
1 parent e2c22e7 commit 8dc4164
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scripts/directives/fa-pipe-from.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ angular.module('famous.angular')
},
function(newTarget, oldTarget){
var source = isolate.renderNode || Engine;
$famousPipe.unpipesFromTargets(oldTarget, source);
$famousPipe.pipesToTargets(newTarget, source);
$famousPipe.unpipesFromTargets(source, oldTarget);
$famousPipe.pipesToTargets(source, newTarget);
}
);

// Destroy listeners along with scope
scope.$on('$destroy', function() {
$famousPipe.unpipesFromTargets(
scope.$eval(attrs.faPipeFrom),
isolate.renderNode || Engine
isolate.renderNode || Engine,
scope.$eval(attrs.faPipeFrom)
);
});
}
Expand Down

0 comments on commit 8dc4164

Please sign in to comment.