Skip to content

Commit

Permalink
console messages duplicates
Browse files Browse the repository at this point in the history
console messages duplicates
3c0b9adc1085f35b3dc4749d19e3321d869e5283
  • Loading branch information
Stanislavsky34200 committed Mar 27, 2024
1 parent 352e562 commit 233e1f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/providers/consoleRenderer/consoleRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ctxErrorLogger } from 'src/utils/errorLogger';
import { cMap } from 'src/utils/array';
import { has } from 'src/utils/object';
import { isString } from 'src/utils/string';
import { globalMemoWin } from 'src/utils/function';
import { debugEnabled } from '../debugConsole/debugEnabled';
import { getEvents } from '../debugEvents';
import { CONSOLE_DICTIONARY, variableRegex } from './dictionary';
Expand Down Expand Up @@ -66,4 +67,7 @@ export const useConsoleRendererRaw = (ctx: Window) => {
});
};

export const useConsoleRenderer = ctxErrorLogger('cr', useConsoleRendererRaw);
export const useConsoleRenderer = ctxErrorLogger(
'cr',
globalMemoWin('conr', useConsoleRendererRaw),
);
6 changes: 4 additions & 2 deletions src/providers/submitTracking/submitTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const log = (
ctx: Window,
counterOptions: CounterOptions,
message: string,
variables?: Record<string, string>,
variables?: Record<string, string | number>,
) =>
shouldLogCheck(ctx, counterOptions).then(
pipe(
Expand Down Expand Up @@ -199,7 +199,9 @@ export const useSubmitTracking = ctxErrorLogger(
),
);

log(ctx, counterOptions, FORM_GOALS_INIT_CONSOLE_MESSAGE);
log(ctx, counterOptions, FORM_GOALS_INIT_CONSOLE_MESSAGE, {
['id']: counterOptions.id,
});

return bindArgs([callFirstArgument, unsubscribeMethodsList], cForEach);
},
Expand Down

0 comments on commit 233e1f6

Please sign in to comment.