Skip to content

Commit

Permalink
Filter out empty query params
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Jan 18, 2024
1 parent f6057d0 commit 4a1038f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/components/chat/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ export class IframeUrl {

for (let key in params) {
let value = params[key];

if (typeof value === 'boolean') {
value = value ? "true" : "false";
}

if (!value) {
continue;
}

this.url.searchParams.append(key, value);
}

Expand Down

0 comments on commit 4a1038f

Please sign in to comment.