Skip to content

Commit e21a0b3

Browse files
Preserve Session Proxy returned from useCheckout hook (#579)
1 parent 8515c42 commit e21a0b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/CheckoutProvider.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ export const extractCheckoutContextValue = (
5858

5959
const {on: _on, session: _session, ...actions} = checkoutSdk;
6060
if (!sessionState) {
61-
return {...actions, ...checkoutSdk.session()};
61+
return Object.assign(checkoutSdk.session(), actions);
6262
}
6363

64-
return {...actions, ...sessionState};
64+
return Object.assign(sessionState, actions);
6565
};
6666

6767
interface CheckoutProviderProps {

0 commit comments

Comments
 (0)