Skip to content

Commit

Permalink
fix renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
PS committed Nov 14, 2024
1 parent 0616a49 commit ddf9038
Showing 1 changed file with 11 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,21 @@ export abstract class AbstractClientPageRenderer extends AbstractPageRenderer {

protected _getHydrateCallback() {
return () =>
this._dispatcher.fire(
RendererEvents.MOUNTED,
{ type: RendererTypes.HYDRATE },
true
);
this._dispatcher.fire(RendererEvents.MOUNTED, {
type: RendererTypes.HYDRATE,
});
}

protected _getRenderCallback() {
return () =>
this._dispatcher.fire(
RendererEvents.MOUNTED,
{ type: RendererTypes.RENDER },
true
);
this._dispatcher.fire(RendererEvents.MOUNTED, {
type: RendererTypes.RENDER,
});
}

protected _getUpdateCallback(pageState: unknown) {
return () => {
this._dispatcher.fire(RendererEvents.UPDATED, { pageState }, true);
this._dispatcher.fire(RendererEvents.UPDATED, { pageState });
};
}

Expand Down Expand Up @@ -280,11 +276,9 @@ export abstract class AbstractClientPageRenderer extends AbstractPageRenderer {
}

protected _runUnmountCallback() {
this._dispatcher.fire(
RendererEvents.UNMOUNTED,
{ type: RendererTypes.UNMOUNT },
true
);
this._dispatcher.fire(RendererEvents.UNMOUNTED, {
type: RendererTypes.UNMOUNT,
});
}

/**
Expand Down Expand Up @@ -388,11 +382,7 @@ export abstract class AbstractClientPageRenderer extends AbstractPageRenderer {
}" was not found in the DOM. ` +
`Maybe the DOM is not in the interactive mode yet.`;

this._dispatcher.fire(
RendererEvents.ERROR,
{ message: errorMessage },
true
);
this._dispatcher.fire(RendererEvents.ERROR, { message: errorMessage });

return Promise.reject(new Error(errorMessage));
}
Expand Down

0 comments on commit ddf9038

Please sign in to comment.