Skip to content

Commit

Permalink
fix: mf-5994 check if ValueRef is ready (#11296)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleBill committed Jan 19, 2024
1 parent fc13269 commit 615e877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared-base-ui/src/hooks/useValueRef.ts
Expand Up @@ -8,7 +8,7 @@ function getServerSnapshot(): never {
export function useValueRef<T>(ref: ValueRef<T>): T {
if ('readyPromise' in ref) {
const ref2 = ref as ValueRefWithReady<T>
if (!ref2.nowReady) use(ref2.readyPromise)
if (!ref2.ready) use(ref2.readyPromise)
}
return useSyncExternalStore(
(f) => ref.addListener(f),
Expand Down

0 comments on commit 615e877

Please sign in to comment.