Merge pull request #1 from AaronDDM/bugfix/max-call-stack-exeeded-on-flush

Brought back a guard to prevent the flush() function from being call …
pull/7725/head
YIFAN WU 4 years ago committed by GitHub
commit 8ddc4646c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,7 +51,9 @@ export function add_flush_callback(fn) {
// function, guarantees this behavior.
const seen_callbacks = new Set();
let flushidx = 0; // Do *not* move this inside the flush() function
let flushing = false;
export function flush() {
if (flushing) return;
const saved_component = current_component;
do {
@ -91,6 +93,7 @@ export function flush() {
flush_callbacks.pop()();
}
flushing = false;
update_scheduled = false;
seen_callbacks.clear();
set_current_component(saved_component);

Loading…
Cancel
Save