Skip to content

Commit

Permalink
Fixing sveltejs#2668, add reset outros state after check outros
Browse files Browse the repository at this point in the history
  • Loading branch information
IOuser committed May 14, 2019
1 parent 7440e2f commit 1ea012e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/internal/transitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,21 @@ function dispatch(node, direction, kind) {

let outros;

export function group_outros() {
function reset_outros() {
outros = {
remaining: 0,
callbacks: []
};
}

export function group_outros() {
reset_outros();
}

export function check_outros() {
if (!outros.remaining) {
run_all(outros.callbacks);
reset_outros();
}
}

Expand Down

0 comments on commit 1ea012e

Please sign in to comment.