modal: handle premature close calls
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/900/head
parent
bf6127493e
commit
32e910561d
|
@ -83,7 +83,13 @@ export default defineComponent({
|
|||
|
||||
methods: {
|
||||
close() {
|
||||
(<any>this.$refs.modal).close();
|
||||
const modal: any = this.$refs.modal;
|
||||
if (modal?.close) {
|
||||
modal.close();
|
||||
} else {
|
||||
// Premature calls, before the modal is mounted
|
||||
this.cleanup();
|
||||
}
|
||||
},
|
||||
|
||||
cleanup() {
|
||||
|
|
Loading…
Reference in New Issue