diff --git a/src/components/IFrame/IFrame.vue b/src/components/IFrame/IFrame.vue index 8285613..75f3a0d 100644 --- a/src/components/IFrame/IFrame.vue +++ b/src/components/IFrame/IFrame.vue @@ -15,7 +15,9 @@ export default { beforeUpdate() { // freezing to prevent unnessessary Reactifiation of vNodes - this.iApp.children = Object.freeze(this.$slots.default) + if (this.iApp) { + this.iApp.children = Object.freeze(this.$slots.default) + } }, methods: { getContentWindow() { @@ -63,7 +65,9 @@ export default { const el = document.createElement('DIV') // we will mount or nested app to this element body.appendChild(el) - const iApp = new Vue({ + const Constructor = Vue || window.Vue + + const iApp = new Constructor({ name: 'iApp', // freezing to prevent unnessessary Reactifiation of vNodes data: { children: Object.freeze(children) }, diff --git a/src/components/Viewer/Viewer.vue b/src/components/Viewer/Viewer.vue index 76366f0..70c8f37 100644 --- a/src/components/Viewer/Viewer.vue +++ b/src/components/Viewer/Viewer.vue @@ -64,7 +64,7 @@