Skip to content

Commit

Permalink
Fix the unnecessary splitting of keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
ommann committed Mar 7, 2024
1 parent 3fdc12f commit 3f4019b
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,15 @@ function splitFields(obj: Record<string, string | string[]>): Record<string, str
const result: Record<string, string[]> = {};

for (const key in obj) {
const value = obj[key];
result[key] = splitParams(value);
// console log key and value
// console.log(key, obj[key]);

if (key === 'q') {
result[key] = [obj[key] as string];
} else {
const value = obj[key];
result[key] = splitParams(value);
}
}

return result;
Expand Down

0 comments on commit 3f4019b

Please sign in to comment.