Skip to content
Snippets Groups Projects
Commit 4416178d authored by Alexander Rose's avatar Alexander Rose
Browse files

fix error handling in readData

parent b8cef99d
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ function readData<T extends XMLHttpRequest | FileReader>(ctx: RuntimeContext, ac ...@@ -78,7 +78,7 @@ function readData<T extends XMLHttpRequest | FileReader>(ctx: RuntimeContext, ac
// first check if data reading is already done // first check if data reading is already done
if (isDone(data)) { if (isDone(data)) {
const { error } = data as FileReader; const { error } = data as FileReader;
if (error !== null) { if (error !== null && error !== undefined) {
reject(error ?? 'Failed.'); reject(error ?? 'Failed.');
} else { } else {
resolve(data); resolve(data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment