Skip to content

Commit

Permalink
fix(taskQueue): fix "immediate" rendering (#2630)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maxjustus committed Aug 12, 2020
1 parent fa9214d commit 62ea511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/update-component.ts
Expand Up @@ -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) => {
Expand Down

0 comments on commit 62ea511

Please sign in to comment.