From 643ebba497e1431f578222bed255cab68f01eefc Mon Sep 17 00:00:00 2001 From: Max Justus Spransy Date: Tue, 11 Aug 2020 12:47:40 -0700 Subject: [PATCH] Fix taskQueue: "immediate" rendering nothing 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) => {