Check existence of `sizeInfo` before updating it's contents

This commit is contained in:
jos 2019-06-26 21:58:41 +02:00
parent cda54f95fc
commit 3920215f73
1 changed files with 3 additions and 1 deletions

View File

@ -210,7 +210,9 @@ previewmode.renderPreview = function () {
? (text.slice(0, MAX_PREVIEW_CHARACTERS) + '...')
: text;
this.dom.sizeInfo.innerText = 'Size: ' + util.formatSize(text.length)
if (this.dom.sizeInfo) {
this.dom.sizeInfo.innerText = 'Size: ' + util.formatSize(text.length);
}
};
/**