Use window instead of window.parent in extractFeatures function (#577)
This commit is contained in:
parent
f33ec09040
commit
ca7cd139ba
|
@ -24,7 +24,7 @@ export type Features = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export function extractFeatures(params?: URLSearchParams): Features {
|
export function extractFeatures(params?: URLSearchParams): Features {
|
||||||
params = params || new URLSearchParams(window.parent.location.search);
|
params = params || new URLSearchParams(window.location.search);
|
||||||
const downcased = new URLSearchParams();
|
const downcased = new URLSearchParams();
|
||||||
params.forEach((value, key) => downcased.append(key.toLocaleLowerCase(), value));
|
params.forEach((value, key) => downcased.append(key.toLocaleLowerCase(), value));
|
||||||
const get = (key: string) => downcased.get("feature." + key.toLocaleLowerCase()) ?? undefined;
|
const get = (key: string) => downcased.get("feature." + key.toLocaleLowerCase()) ?? undefined;
|
||||||
|
|
Loading…
Reference in New Issue