Skip to content

Commit

Permalink
refactor(use-track): update conditional to check for undefined instea…
Browse files Browse the repository at this point in the history
…d of falsy values
  • Loading branch information
jarvis2f committed Apr 2, 2024
1 parent 7e18a68 commit da2b08f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/hooks/use-track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function useTrack() {
const { data: session } = useSession();
return {
track: (event: string, data: Record<string, any>) => {
if (!umami) {
if (typeof umami === "undefined") {
return;
}
if (session?.user) {
Expand Down

0 comments on commit da2b08f

Please sign in to comment.