浏览代码

update is sentry enabled check

Abhinav 1 年之前
父节点
当前提交
4ac4fa14b0
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      packages/shared/next/utils/sentry.js
  2. 1 1
      packages/shared/sentry/utils.ts

+ 1 - 1
packages/shared/next/utils/sentry.js

@@ -8,7 +8,7 @@ const cp = require('child_process');
 module.exports.getIsSentryEnabled = () => {
     const isAppENVDevelopment = getAppEnv() === ENV_DEVELOPMENT;
     const isSentryDisabled = isDisableSentryFlagSet();
-    return !isAppENVDevelopment || !isSentryDisabled;
+    return !isAppENVDevelopment && !isSentryDisabled;
 };
 
 module.exports.getGitSha = () =>

+ 1 - 1
packages/shared/sentry/utils.ts

@@ -51,5 +51,5 @@ export function isErrorUnnecessaryForSentry(error: any) {
 export const getIsSentryEnabled = () => {
     const isAppENVDevelopment = getAppEnv() === APP_ENV.DEVELOPMENT;
     const isSentryDisabled = isDisableSentryFlagSet();
-    return !isAppENVDevelopment || !isSentryDisabled;
+    return !isAppENVDevelopment && !isSentryDisabled;
 };