diff --git a/UI/GeneralUI.js b/UI/GeneralUI.js index 66a82fa..23ac707 100644 --- a/UI/GeneralUI.js +++ b/UI/GeneralUI.js @@ -98,7 +98,10 @@ export class GeneralUI const length = e.length; for (let i = 0; i < length; ++i) { - e[i].height = e[i].contentWindow.document.body.scrollHeight + 25; + if (e[i].contentWindow.document.body !== null) { + e[i].height = e[i].contentWindow.document.body.scrollHeight + 25; + } + e[i].addEventListener('load', function() { this.height = this.contentWindow.document.body.scrollHeight + 25; });