Skip to content

Commit e552632

Browse files
committed
Update index.tsx
1 parent 415a3be commit e552632

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/theme/URLParams/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ export const getWindowLocation = () => {
66
export const getURLOptions = () => {
77
const url = new URL(getWindowLocation());
88

9-
const urlOpts: Record<string, string> = {};
9+
const urlOpts = new Map<string, string>();
1010
url.searchParams.forEach((value, key) => {
11-
if (key !== "__proto__" && key !== "constructor" && key !== "prototype") {
12-
urlOpts[key] = value;
13-
}
11+
urlOpts.set(key, value);
1412
});
1513

16-
return { ...urlOpts };
14+
return Object.fromEntries(urlOpts);
1715
};
1816

1917
export const getURLFromFilterOptions = (opts: Record<string, string>): string => {

0 commit comments

Comments
 (0)