Browse Source

fix error handling in readData

Alexander Rose 5 years ago
parent
commit
4416178d6f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-util/data-source.ts

+ 1 - 1
src/mol-util/data-source.ts

@@ -78,7 +78,7 @@ function readData<T extends XMLHttpRequest | FileReader>(ctx: RuntimeContext, ac
         // first check if data reading is already done
         if (isDone(data)) {
             const { error } = data as FileReader;
-            if (error !== null) {
+            if (error !== null && error !== undefined) {
                 reject(error ?? 'Failed.');
             } else {
                 resolve(data);