Skip to content

Commit a63fe5d

Browse files
committed
fix: lint
1 parent 31199ab commit a63fe5d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/runtime/composables/queryRef.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function updateQueryParamInURL(key, value, defaultValue, type: QueryParamType) {
3131
const url = new URL(window.location.href)
3232
if (value != defaultValue) {
3333
url.searchParams.set(key, value.toString())
34-
} else {
34+
}
35+
else {
3536
url.searchParams.delete(key)
3637
}
3738
url.search = decodeURIComponent(url.search)
@@ -43,10 +44,10 @@ function loadQueryParamFromURL(key: string, type: QueryParamType) {
4344
if (!loadedString) return
4445

4546
if (type == 'number') return +loadedString
46-
if (type == 'number[]') return loadedString.split(',').map((n) => +n)
47+
if (type == 'number[]') return loadedString.split(',').map(n => +n)
4748
if (type == 'string[]') return loadedString.split(',')
4849
if (type == 'boolean') return loadedString == 'true'
49-
if (type == 'boolean[]') return loadedString.split(',').map((n) => n == 'true')
50+
if (type == 'boolean[]') return loadedString.split(',').map(n => n == 'true')
5051
if (['object', 'object[]'].includes(type)) return JSON.parse(loadedString)
5152
return loadedString
5253
}

0 commit comments

Comments
 (0)