Skip to content

Commit

Permalink
Fix: remove unneeded nullsafes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnrudd committed Nov 3, 2023
1 parent f12e76c commit edc0fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/HoistComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ function wrapWithModel(render: RenderFn, cfg: Config): RenderFn {
delete props.modelRef;
delete props.modelConfig;
ctx.props = props;
ctx.modelLookup = insertLookup?.current ?? modelLookup;
ctx.modelLookup = insertLookup.current ?? modelLookup;
useOnMount(() => instanceManager.registerModelWithTestId(props.testId, model));
useOnUnmount(() => instanceManager.unregisterModelWithTestId(props.testId));
return render(props, ref);
Expand All @@ -341,7 +341,7 @@ function wrapWithModel(render: RenderFn, cfg: Config): RenderFn {
? managedRender()
: createElement(HostCmp, {managedRender, key: model?.xhId});

return insertLookup?.current
return insertLookup.current
? modelLookupContextProvider({value: insertLookup.current, item: ret})
: ret;
};
Expand Down

0 comments on commit edc0fe8

Please sign in to comment.