fix(ui): modal null error

This commit is contained in:
ArneBo 2025-04-07 12:41:05 +02:00
parent b7a1efb08c
commit b64d157252
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ export const useModal = <T> (
return flag in query.value && assignment.isOn(query.value[flag]) return flag in query.value && assignment.isOn(query.value[flag])
}, },
set (newValue: boolean) { set (newValue: boolean) {
router.push({ router?.push({
query: { query: {
...query.value, ...query.value,
[flag]: newValue ? assignment.on(null) : undefined [flag]: newValue ? assignment.on(null) : undefined
@ -78,7 +78,7 @@ export const useModal = <T> (
return typeof flagValue === 'string' ? flagValue : flagValue === null ? '' : flagValue.join(' ') return typeof flagValue === 'string' ? flagValue : flagValue === null ? '' : flagValue.join(' ')
}, },
set (newValue: string) { set (newValue: string) {
router.push({ router?.push({
query: { query: {
...query.value, ...query.value,
[flag]: newValue [flag]: newValue