From 54abf0c0832d1451dfe11be212fc5f938ff5c5fd Mon Sep 17 00:00:00 2001 From: stropho <3704482+stropho@users.noreply.github.com> Date: Mon, 3 Oct 2022 18:37:26 +0200 Subject: [PATCH] fix: correctly check for non-null object (#1122)(by @stropho) --- src/hooks/useReactiveSharedValue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useReactiveSharedValue.ts b/src/hooks/useReactiveSharedValue.ts index 4291b0976..05866c459 100644 --- a/src/hooks/useReactiveSharedValue.ts +++ b/src/hooks/useReactiveSharedValue.ts @@ -11,7 +11,7 @@ export const useReactiveSharedValue = ( const initialValueRef = useRef(null); const valueRef = useRef>(null); - if (typeof value === 'object' && 'value' in value) { + if (value && typeof value === 'object' && 'value' in value) { /** * if provided value is a shared value, * then we do not initialize another one.