Skip to content

Commit f820d74

Browse files
committed
fix: dialog can't have a function on the server
1 parent dcaf8d2 commit f820d74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/runtime/composables/dialog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ export interface Dialog {
66
title: string
77
message: string
88
action: {
9-
function: () => Promise<void>
9+
function: (() => Promise<void>) | null
1010
buttonText: string
1111
buttonColor: string
1212
}
1313
closeButtonText: string
1414
}
1515

16-
export const dialogInitialState = <Dialog>{
16+
export const dialogInitialState: Dialog = {
1717
show: false,
1818
title: '',
1919
message: '',
2020
action: {
21-
function: () => new Promise<void>(resolve => resolve()),
21+
function: null,
2222
buttonText: '',
2323
buttonColor: '',
2424
},

0 commit comments

Comments
 (0)