ensures sequential lifecycle ending in afterUpdate

pull/3307/head
Devi Prasad 6 years ago committed by GitHub
parent f65ce85748
commit 91bd8412ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,6 +35,9 @@ export function flush() {
const seen_callbacks = new Set(); const seen_callbacks = new Set();
do { do {
// invalidate bindings before checking dirty_components
while (binding_callbacks.length) binding_callbacks.pop()();
// first, call beforeUpdate functions // first, call beforeUpdate functions
// and update components // and update components
while (dirty_components.length) { while (dirty_components.length) {
@ -43,8 +46,6 @@ export function flush() {
update(component.$$); update(component.$$);
} }
while (binding_callbacks.length) binding_callbacks.pop()();
// then, once components are updated, call // then, once components are updated, call
// afterUpdate functions. This may cause // afterUpdate functions. This may cause
// subsequent updates... // subsequent updates...

Loading…
Cancel
Save