Skip to content

Commit

Permalink
ensure parse returns strings
Browse files Browse the repository at this point in the history
  • Loading branch information
BRKalow committed Nov 5, 2024
1 parent c29c23d commit 36ce3df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/clerk-js/src/utils/redirectUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ export class RedirectUrls {
// @ts-expect-error
res[key] = obj[key];
});
return this.#filterRedirects(this.#toAbsoluteUrls(filterProps(res, Boolean)));
return applyFunctionToObj(this.#filterRedirects(this.#toAbsoluteUrls(filterProps(res, Boolean))), val =>
val.toString(),
);
}

#parseSearchParams(obj: any) {
Expand All @@ -156,7 +158,9 @@ export class RedirectUrls {
res[key] = obj[camelToSnake(key)];
});
res['redirectUrl'] = obj.redirect_url;
return this.#filterRedirects(this.#toAbsoluteUrls(filterProps(res, Boolean)));
return applyFunctionToObj(this.#filterRedirects(this.#toAbsoluteUrls(filterProps(res, Boolean))), val =>
val.toString(),
);
}

#toAbsoluteUrls(obj: RedirectOptions) {
Expand Down

0 comments on commit 36ce3df

Please sign in to comment.