Skip to content

Commit

Permalink
fix(core): check if previous state is null for unmounted component (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cngonzalez committed Feb 29, 2024
1 parent 6d61e94 commit 9ed5cca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function useReferenceInfo(
// workaround for a "bug" with useMemoObservable that doesn't
// return the initial value upon resubscription
const previousId = usePrevious(doc._id, doc._id)
if (previousId !== doc._id) {
if (doc._id && previousId !== doc._id) {
return INITIAL_LOADING_STATE
}
return referenceInfo
Expand Down

0 comments on commit 9ed5cca

Please sign in to comment.