fix(ui): modal null error
This commit is contained in:
parent
b7a1efb08c
commit
b64d157252
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue