Skip to content
Closed
Changes from all commits
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
5 changes: 3 additions & 2 deletions src/runtime/internal/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export function flush() {
const seen_callbacks = new Set();

do {
// invalidate bindings before checking dirty_components
while (binding_callbacks.length) binding_callbacks.pop()();

// first, call beforeUpdate functions
// and update components
while (dirty_components.length) {
Expand All @@ -43,8 +46,6 @@ export function flush() {
update(component.$$);
}

while (binding_callbacks.length) binding_callbacks.pop()();

// then, once components are updated, call
// afterUpdate functions. This may cause
// subsequent updates...
Expand Down