Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-haynes committed Nov 3, 2023
1 parent 0422f30 commit b161f71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/container/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const dispatchRenderEvent: DispatchRenderEventCallback = ({

try {
postComponentRenderMessage({
childComponents,
childComponents: childComponents || [],
componentId: componentId,
node: serializedNode,
trust,
Expand Down
6 changes: 3 additions & 3 deletions packages/container/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export interface InitContainerParams {
preactRootComponentName: string;
props: any;
render: PreactRender;
trust: string;
trust: ComponentTrust;
updateContainerProps: UpdateContainerPropsCallback;
};
}
Expand Down Expand Up @@ -332,11 +332,11 @@ export interface DispatchRenderEventParams {
componentId: string;
node: Node;
nodeRenders: Map<string, string>;
postComponentRenderMessage: (p: any) => void;
postComponentRenderMessage: PostMessageComponentRenderCallback;
preactRootComponentName: string;
serializeNode: (p: SerializeNodeParams) => SerializedNode;
serializeProps: SerializePropsCallback;
trust: string;
trust: ComponentTrust;
}
export type DispatchRenderEventCallback = (
params: DispatchRenderEventParams
Expand Down
2 changes: 1 addition & 1 deletion packages/iframe/src/SandboxedIframe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function buildSandboxedComponent({
preactHooksDiffed: Preact.options.diffed,
preactRootComponentName: Preact.Fragment.name,
render: Preact.render,
trust: '${JSON.stringify(trust)}',
trust: ${JSON.stringify(trust)},
updateContainerProps: (updateProps) => {
const originalProps = props;
// if nothing has changed, the same [props] object will be returned
Expand Down

0 comments on commit b161f71

Please sign in to comment.