Skip to content

Commit 61696e1

Browse files
Merge pull request #208 from positivecrash/main
fix
2 parents 5442863 + 3d67719 commit 61696e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pages/demoapps/johnnyb-lab.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ export default {
2626
2727
methods: {
2828
resizeIframe() {
29-
const iframe = document.getElementById("appframe");
30-
if(iframe) {
31-
console.log('height', iframe.contentWindow.document.body.scrollHeight);
32-
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
29+
if (typeof document !== 'undefined') {
30+
const iframe = document.getElementById("appframe");
31+
if(iframe) {
32+
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
33+
}
3334
}
3435
}
3536
},

0 commit comments

Comments
 (0)