Trim readFile error message

This commit is contained in:
Sam Carlton 2022-08-21 08:45:04 -05:00
parent fa156c3733
commit e5b3ba3d9e

View file

@ -299,7 +299,7 @@ export function FileReader () {
function readFile(_file, format, encoding) {
file = _file;
if (!file || !file.name || !(file.path || file.stream || file.buffer)) {
throw new Error("cannot read as File: " + JSON.stringify(file));
throw new Error("cannot read as File: " + JSON.stringify(file).slice(0, 1000));
}
if (0 !== self.readyState) {
console.log("already loading, request to change format ignored");