Skip to content

Commit

Permalink
🩹 fix(useSubscription): Handle a posteriori null publication.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Dec 12, 2024
1 parent 3195d7e commit 71ec82e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion imports/api/publication/useSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ const useSubscriptionClient = <A extends Args>(
const deps = [setLoading, publication, JSON.stringify(args)];

useEffect(() => {
if (!publication) return undefined;
if (!publication) {
setLoading(true);
return undefined;
}

const id = {};
handleRef.current = id;
const setNotLoading = () => {
Expand Down

0 comments on commit 71ec82e

Please sign in to comment.