Skip to content

Commit

Permalink
fix(screeb-sdk-react): isLoaded true on init
Browse files Browse the repository at this point in the history
  • Loading branch information
cley44 committed Nov 12, 2024
1 parent 5a7106a commit 714dd41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/screeb-sdk-react/src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const ScreebProvider: React.FC<
isLoaded.current = false;
isInitialized = false;
}
}, [isLoaded.current]);
}, [isLoaded.current, isInitialized]);

const debug = React.useCallback(
async () => await ensureScreeb("debug", () => Screeb.debug()),
Expand Down Expand Up @@ -156,6 +156,7 @@ export const ScreebProvider: React.FC<
Screeb.init(websiteId, userId, userProperties, hooks, language);

isInitialized = true;
isLoaded.current = true;
}
},
true,
Expand Down

0 comments on commit 714dd41

Please sign in to comment.