chore: Use isDevEnv() and isTestEnv() (#9264)

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mursaleen Nisar
2025-03-25 00:14:00 +05:30
committed by GitHub
parent 77aca48c84
commit e1bb59fb8f
16 changed files with 48 additions and 45 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
// place here categories that you want to track. We want to track just a
import { isDevEnv } from "./utils";
// small subset of categories at a given time.
const ALLOWED_CATEGORIES_TO_TRACK = new Set(["command_palette", "export"]);
@@ -21,7 +24,7 @@ export const trackEvent = (
return;
}
if (import.meta.env.DEV) {
if (isDevEnv()) {
// comment out to debug in dev
return;
}