Skip to content

Commit f6fc1da

Browse files
authored
wait im stupid
1 parent 5684192 commit f6fc1da

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/addons/api.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -660,21 +660,21 @@ class Tab extends EventTargetShim {
660660
}
661661

662662
createModal (title, {isOpen = false} = {}) {
663-
const modal = modal.createEditorModal(this, title, {isOpen});
664-
window.vm.emit("ADDON_WORKER_MODAL", modal);
665-
return modal;
663+
const createdModal = modal.createEditorModal(this, title, {isOpen});
664+
this.traps.vm.emit("ADDON_WORKER_MODAL", createdModal);
665+
return createdModal;
666666
}
667667

668668
confirm (...args) {
669-
const modal = modal.confirm(this, ...args);
670-
window.vm.emit("ADDON_WORKER_MODAL", modal);
671-
return modal;
669+
const createdModal = modal.confirm(this, ...args);
670+
this.traps.vm.emit("ADDON_WORKER_MODAL", createdModal);
671+
return createdModal;
672672
}
673673

674674
prompt (...args) {
675-
const modal = modal.prompt(this, ...args);
676-
window.vm.emit("ADDON_WORKER_MODAL", modal);
677-
return modal;
675+
const createdModal = modal.prompt(this, ...args);
676+
this.traps.vm.emit("ADDON_WORKER_MODAL", createdModal);
677+
return createdModal;
678678
}
679679
}
680680

0 commit comments

Comments
 (0)