guard against typeError when importing sheets

This commit is contained in:
ansuz 2021-09-27 14:43:46 +05:30 committed by ansuz
parent fab629bf6d
commit 5afb3f7893
1 changed files with 5 additions and 1 deletions

View File

@ -82,7 +82,11 @@ var factory = function () {
plainText.innerText = e.srcElement.result;
cb(void 0, plainText);
});
reader.readAsText(content);
try {
reader.readAsText(content);
} catch (err) {
cb(err);
}
},
image: function (metadata, url, content, cfg, cb) {
var img = document.createElement('img');