We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 415a3be commit e552632Copy full SHA for e552632
src/theme/URLParams/index.tsx
@@ -6,14 +6,12 @@ export const getWindowLocation = () => {
6
export const getURLOptions = () => {
7
const url = new URL(getWindowLocation());
8
9
- const urlOpts: Record<string, string> = {};
+ const urlOpts = new Map<string, string>();
10
url.searchParams.forEach((value, key) => {
11
- if (key !== "__proto__" && key !== "constructor" && key !== "prototype") {
12
- urlOpts[key] = value;
13
- }
+ urlOpts.set(key, value);
14
});
15
16
- return { ...urlOpts };
+ return Object.fromEntries(urlOpts);
17
};
18
19
export const getURLFromFilterOptions = (opts: Record<string, string>): string => {
0 commit comments