Use window instead of window.parent in extractFeatures function (#577)

This commit is contained in:
victor-meng 2021-03-23 17:21:41 -07:00 committed by GitHub
parent f33ec09040
commit ca7cd139ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export type 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();
params.forEach((value, key) => downcased.append(key.toLocaleLowerCase(), value));
const get = (key: string) => downcased.get("feature." + key.toLocaleLowerCase()) ?? undefined;