mirror of
https://github.com/KevinMidboe/seasoned.git
synced 2026-03-11 11:55:38 +00:00
Safer popup params to object logic
This commit is contained in:
@@ -11,9 +11,12 @@ const removeIncludedQueryParams = (params, key) => {
|
||||
|
||||
function paramsToObject(entries) {
|
||||
const result = {};
|
||||
return entries.forEach((key, value) => {
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const [key, value] of entries) {
|
||||
result[key] = value;
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
const updateQueryParams = (id: number = null, type: MediaTypes = null) => {
|
||||
|
||||
Reference in New Issue
Block a user