Skip to content

Commit 1daeacb

Browse files
fix ts errors
1 parent 9581df5 commit 1daeacb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

node_package/src/ClientSideRenderer.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ async function delegateToRenderer(
2020
railsContext: RailsContext,
2121
domNodeId: string,
2222
trace: boolean,
23-
): boolean {
23+
): Promise<boolean> {
2424
const { name, component, isRenderer } = componentObj;
2525

2626
if (isRenderer) {
2727
if (trace) {
2828
console.log(
29-
`DELEGATING TO RENDERER ${componentObj.name} for dom node with id: ${domNodeId} with props, railsContext:`,
29+
`DELEGATING TO RENDERER ${name} for dom node with id: ${domNodeId} with props, railsContext:`,
3030
props,
3131
railsContext,
3232
);
3333
}
3434

35-
(component as RenderFunction)(props, railsContext, domNodeId);
35+
await (component as RenderFunction)(props, railsContext, domNodeId);
3636
return true;
3737
}
3838

node_package/src/ComponentRegistry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
}
2121

2222
const renderFunction = isRenderFunction(component);
23-
const isRenderer = renderFunction && (component as RenderFunction).length === 3;
23+
const isRenderer = renderFunction && component .length === 3;
2424

2525
componentRegistry.set(name, {
2626
name,

0 commit comments

Comments
 (0)