Skip to content

#2668 - Add null-checks in on_outro callback for IfBlock #2717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
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
Fixing #2668, add reset outros state after check outros
  • Loading branch information
IOuser committed May 14, 2019
commit 1ea012e163f561856e242398436a155c5291cdd2
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