Skip to content

Commit

Permalink
Remove error log from production
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Sep 27, 2023
1 parent 54cf01e commit a41df01
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const initialState: AnalysisParamsNull = {
errors: null
};

const LOG = process.env.NODE_ENV !== 'production';
export class ValidationError extends Error {
hints: any[];

Expand Down Expand Up @@ -125,7 +126,7 @@ export function useAnalysisParams(): {
} catch (error) {
if (error instanceof ValidationError) {
/* eslint-disable no-console */
error.hints.forEach((s) => console.log(s));
if (LOG) error.hints.forEach((s) => console.log(s));
/* eslint-enable no-console */
setParams({
...initialState,
Expand Down

0 comments on commit a41df01

Please sign in to comment.