File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
packages/vue-final-modal/src Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ onBeforeUnmount(() => {
22
22
v-for =" (modal, index) in vfm.dynamicModals"
23
23
:key =" modal.id"
24
24
v-bind =" {
25
- displayDirective: modal.keepAlive ? 'show' : undefined,
25
+ displayDirective: modal? .keepAlive ? 'show' : undefined,
26
26
...modal.attrs,
27
27
}"
28
28
v-model =" modal.modelValue"
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ function createInternalVfm(vfm: Vfm) {
94
94
} ,
95
95
resolvedClosed ( index : number ) {
96
96
dynamicModals [ index ] ?. resolveClosed ?.( )
97
- if ( ! dynamicModals [ index ] . keepAlive )
97
+ if ( ! dynamicModals [ index ] ? .keepAlive )
98
98
dynamicModals . splice ( index , 1 )
99
99
} ,
100
100
resolvedOpened ( index : number ) {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export function useModal<P = InstanceType<typeof VueFinalModal>['$props']>(_opti
79
79
...withMarkRaw < P > ( _options ) ,
80
80
} ) as UseModalOptions < P > & UseModalOptionsPrivate
81
81
tryOnUnmounted ( ( ) => {
82
- if ( ! options . keepAlive )
82
+ if ( ! options ? .keepAlive )
83
83
destroy ( )
84
84
} )
85
85
@@ -114,8 +114,8 @@ export function useModal<P = InstanceType<typeof VueFinalModal>['$props']>(_opti
114
114
115
115
if ( _options . defaultModelValue !== undefined )
116
116
options . defaultModelValue = _options . defaultModelValue
117
- if ( _options . keepAlive !== undefined )
118
- options . keepAlive = _options . keepAlive
117
+ if ( _options ? .keepAlive !== undefined )
118
+ options . keepAlive = _options ? .keepAlive
119
119
if ( _options . context )
120
120
options . context = _options . context
121
121
You can’t perform that action at this time.
0 commit comments