Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
debadree25 committed Feb 24, 2023
1 parent 9d421de commit 1c52b18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmark/url/url-searchparams-toString.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ function paramGenerator(paramType) {
case 'string':
// Return the values object with all values as strings
return valueKeys.reduce((acc, key) => {
acc[key] = Object.keys(values[key]).reduce((acc, k, i) => {
acc += `${k}=${values[key][k]}${i < valueKeys.length - 1 ? '&' : ''}`;
const objectKeys = Object.keys(values[key]);
acc[key] = objectKeys.reduce((acc, k, i) => {
acc += `${k}=${values[key][k]}${i < objectKeys.length - 1 ? '&' : ''}`;
return acc;
}, '');
return acc;
Expand Down

0 comments on commit 1c52b18

Please sign in to comment.