Skip to content

Commit d90498e

Browse files
authored
fix: Empty string, undefined and null values in parameters are now untouched (#17)
1 parent 93a5d56 commit d90498e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/core/RouterEngine.svelte.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ function escapeRegExp(string: string): string {
6767
}
6868

6969
function tryParseValue(value: string) {
70+
if (value === '' || value === undefined || value === null) {
71+
return value;
72+
}
7073
const num = Number(value);
7174
if (!isNaN(num)) {
7275
return num;

0 commit comments

Comments
 (0)