Skip to content

Commit c778d88

Browse files
committed
fix(modal): modal promises not resolved
1 parent 1ed8c66 commit c778d88

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/scripts/plugins/modal.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ function createModal (Vue, attrs, Component) {
6060
}
6161
})
6262

63-
// TODO: throw error or something
64-
if (typeof document !== 'undefined' && document.body) {
65-
const div = document.createElement('div')
66-
document.body.appendChild(div)
67-
vm.$mount(div)
68-
}
69-
7063
return new Promise((resolve, reject) => {
7164
handlers.cancel = reject
7265
handlers.confirm = resolve
7366
handlers.destroy = () => vm.$destroy()
67+
68+
// TODO: throw error or something
69+
if (typeof document !== 'undefined' && document.body) {
70+
const div = document.createElement('div')
71+
document.body.appendChild(div)
72+
vm.$mount(div)
73+
}
7474
})
7575
}

0 commit comments

Comments
 (0)