Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
fix(core): decode query params (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard committed Jun 14, 2023
1 parent dd26429 commit 73c4a9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cheetah.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export class cheetah<
query[key] = true
else if (value === 'false')
query[key] = false
else if (value.includes(','))
else if (value.indexOf(',') < 0)
query[key] = value.split(',')
else if (!isNaN((value as unknown) as number) && !isNaN(parseFloat(value)))
query[key] = parseInt(value)
Expand All @@ -379,7 +379,7 @@ export class cheetah<
else if (value === 'null')
query[key] = null
else
query[key] = value
query[key] = decodeURIComponent(value)
}

const isValid = this.#validator.name === 'typebox' && this.#validator.check
Expand Down

0 comments on commit 73c4a9d

Please sign in to comment.