Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
patched potential leak by wrapping callback in a closure to deference…
… iterator
  • Loading branch information
thebigredgeek committed Aug 30, 2014
commit 5a0405202b069a3f4eb7ca4d6c9a0c36c6471464
6 changes: 3 additions & 3 deletions src/ng/directive/ngSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ var ngSwitchDirective = ['$animate', function($animate) {
for (i = 0, ii = selectedScopes.length; i < ii; ++i) {
var selected = getBlockNodes(selectedElements[i].clone);
selectedScopes[i].$destroy();
previousElements[i] = selected;
$animate.leave(selected).then((function(i) {
var promise = previousLeaveAnimations[i] = $animate.leave(selected);
promise.then((function(i) {
return function(){
previousElements.splice(i, 1).remove();
previousLeaveAnimations.splice(i, 1);
};
}(i)));
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.