Skip to content

Commit c86bbb7

Browse files
committed
fix: type issue
1 parent 06ca2cf commit c86bbb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/context.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export function withResizerContext<T extends ChildProps>(
2020
) {
2121
return (props: Omit<T, 'context'>) => (
2222
<ResizerConsumer>
23-
{(context) => <Target {...props} context={context} />}
23+
{(context) => {
24+
const finalProps = { ...props, context } as T;
25+
return <Target {...finalProps} />;
26+
}}
2427
</ResizerConsumer>
2528
);
2629
}

0 commit comments

Comments
 (0)