From be6ad8ce2a96058f2ea69d4b99f5bbb370603001 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Fri, 28 Oct 2022 12:39:19 +0200 Subject: [PATCH] cleanup --- public/js/components/Bootstrap/Modal.js | 13 +++++++------ public/js/components/Dashboard/Dashboard.js | 1 - public/js/components/Dashboard/Section.js | 5 ----- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/public/js/components/Bootstrap/Modal.js b/public/js/components/Bootstrap/Modal.js index c99aabb58..0e5472477 100644 --- a/public/js/components/Bootstrap/Modal.js +++ b/public/js/components/Bootstrap/Modal.js @@ -46,11 +46,12 @@ export default { } }, mounted() { - this.modal = new bootstrap.Modal(this.$refs.modal, { - backdrop: this.backdrop, - focus: this.focus, - keyboard: this.keyboard - }); + if (this.$refs.modal) + this.modal = new bootstrap.Modal(this.$refs.modal, { + backdrop: this.backdrop, + focus: this.focus, + keyboard: this.keyboard + }); }, popup(body, options, title, footer) { const BsModal = this; @@ -80,8 +81,8 @@ export default { } }); const wrapper = document.createElement("div"); - instance.mount(wrapper); document.body.appendChild(wrapper); + instance.mount(wrapper); }); }, template: `