Skip to content

Commit

Permalink
fix: make debug optional based on the environment
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
gventuri and coderabbitai[bot] authored Oct 25, 2024
1 parent b954c85 commit a6e965a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/lib/mixpanelLib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let isInitialized = false;

const initMixpanel = async () => {
if (typeof window !== "undefined" && MIXPANEL_TOKEN && !isInitialized) {
mixpanel.init(MIXPANEL_TOKEN, { debug: true });
mixpanel.init(MIXPANEL_TOKEN, { debug: process.env.NODE_ENV === 'development' });

const user = await GetUserData();

Expand Down

0 comments on commit a6e965a

Please sign in to comment.