Skip to content

Commit

Permalink
Fixed debug mode validations
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonortiz committed Nov 29, 2024
1 parent eeaa233 commit 14792ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Analytics {

return this.eventData;
} catch (error) {
if (this.isDebugMode || (!this.isDebugMode && !isDevEnv())) {
if (this.isDebugMode || !isDevEnv()) {
console.error(error.message);
}

Expand Down Expand Up @@ -111,7 +111,7 @@ class Analytics {
},
};

if (this.isDebugMode || (!this.isDebugMode && !isDevEnv())) {
if (this.isDebugMode || !isDevEnv()) {
userInfoEvent(userInfoData);
}
}
Expand All @@ -137,7 +137,7 @@ class Analytics {
actionName,
};

if (this.isDebugMode || (!this.isDebugMode && !isDevEnv())) {
if (this.isDebugMode || !isDevEnv()) {
actionEvent(actionData);
}
}
Expand All @@ -161,7 +161,7 @@ class Analytics {
...formatBasicData(userInfo),
};

if (this.isDebugMode || (!this.isDebugMode && !isDevEnv())) {
if (this.isDebugMode || !isDevEnv()) {
customEvent(customName, customData, requiredParams);
}
}
Expand All @@ -179,7 +179,7 @@ class Analytics {

if (!includesAllProperties(userInfo)) return null;

if (this.isDebugMode || (!this.isDebugMode && !isDevEnv())) {
if (this.isDebugMode || !isDevEnv()) {
screenViewEvent(screenName, screenClass, userInfo);
}
}
Expand Down

0 comments on commit 14792ae

Please sign in to comment.