From 62ea51121b8b77b9e9122e37657ce4c911538a5d Mon Sep 17 00:00:00 2001 From: Max Justus Spransy Date: Tue, 11 Aug 2020 18:26:10 -0700 Subject: [PATCH] fix(taskQueue): fix "immediate" rendering (#2630) With taskQueue: "async" and "congestedAsync" `scheduleUpdate` calls `writeTask`, passing it the `dispatch` callback. `writeTask` calls the passed in dispatch callback in `process.nextTick()` Before this change, when the taskQueue: was set to `immediate`, the dispatch callback was never called. Resulting in no components rendering in the DOM. --- src/runtime/update-component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/update-component.ts b/src/runtime/update-component.ts index 1296a77a536..b2dc25a0b4b 100644 --- a/src/runtime/update-component.ts +++ b/src/runtime/update-component.ts @@ -28,7 +28,7 @@ export const scheduleUpdate = (hostRef: d.HostRef, isInitialLoad: boolean) => { // has already fired off its lifecycle update then // fire off the initial update const dispatch = () => dispatchHooks(hostRef, isInitialLoad); - return BUILD.taskQueue ? writeTask(dispatch) : dispatch; + return BUILD.taskQueue ? writeTask(dispatch) : dispatch(); }; const dispatchHooks = (hostRef: d.HostRef, isInitialLoad: boolean) => {