Skip to content

Commit a6b60b9

Browse files
Merge pull request #210 from positivecrash/main
fix permission
2 parents 87b2928 + bfe9e29 commit a6b60b9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/pages/demoapps/johnnyb-lab.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,21 @@ export default {
3939
methods: {
4040
resizeIframe() {
4141
if (typeof document !== 'undefined') {
42-
const iframe = document.getElementById("appframe");
43-
if(iframe) {
44-
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
42+
try{
43+
const iframe = document.getElementById("appframe");
44+
if(iframe) {
45+
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
46+
}
47+
} catch(e) {
48+
console.log(e);
4549
}
4650
}
4751
}
4852
},
4953
50-
mounted() {
51-
window.addEventListener('resize', this.resizeIframe);
52-
},
54+
// mounted() {
55+
// window.addEventListener('resize', this.resizeIframe);
56+
// },
5357
5458
5559
}

0 commit comments

Comments
 (0)