Skip to content

Commit

Permalink
fix: correctly check for non-null object (#1122)(by @stropho)
Browse files Browse the repository at this point in the history
  • Loading branch information
stropho authored Oct 3, 2022
1 parent f3f9ef4 commit 54abf0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useReactiveSharedValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const useReactiveSharedValue = <T>(
const initialValueRef = useRef<T>(null);
const valueRef = useRef<Animated.SharedValue<T>>(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.
Expand Down

0 comments on commit 54abf0c

Please sign in to comment.