Skip to content

Commit

Permalink
added another non-hashable param to firstPartyMethod
Browse files Browse the repository at this point in the history
4d37af27908e01675cdd1ac2d2ed5626cfd5f9f3
  • Loading branch information
Stanislavsky34200 committed Apr 17, 2024
1 parent 05fe65a commit dbf73cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/providers/firstPartyMethod/firstPartyMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
METHOD_NAME_PARAMS,
} from 'src/providers/params/const';
import { PolyPromise } from 'src/utils';
import { cReduce, cEvery } from 'src/utils/array';
import { cReduce, cEvery, includes } from 'src/utils/array';
import { getCounterInstance } from 'src/utils/counter';
import { CounterOptions, getCounterKey } from 'src/utils/counterOptions';
import {
Expand Down Expand Up @@ -207,6 +207,7 @@ export const processEmail = (origEmail: string): string => {
return `${local}@${domain}`;
};

const NON_HASHABLE_KEYS: string[] = ['yandex_cid', 'yandex_public_id'];
export const encodeRecursive = (
ctx: Window,
obj: FirstPartyInputData,
Expand Down Expand Up @@ -237,8 +238,8 @@ export const encodeRecursive = (
val as FirstPartyInputData,
level + 1,
);
} else if (!level && key === 'yandex_cid') {
// METR-48665
} else if (!level && includes(key, NON_HASHABLE_KEYS)) {
// METR-48665, METR-59109
resultPromise = PolyPromise.resolve(val as string);
} else {
let value = val as string;
Expand Down

0 comments on commit dbf73cd

Please sign in to comment.