« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/file-size-preloader.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/file-size-preloader.js')
-rw-r--r--src/file-size-preloader.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/file-size-preloader.js b/src/file-size-preloader.js
index 38e60e67..4eadde7b 100644
--- a/src/file-size-preloader.js
+++ b/src/file-size-preloader.js
@@ -29,6 +29,8 @@ export default class FileSizePreloader {
   #loadingPromise = null;
   #resolveLoadingPromise = null;
 
+  hadErrored = false;
+
   loadPaths(...paths) {
     this.#paths.push(...paths.filter((p) => !this.#paths.includes(p)));
     return this.#startLoadingPaths();
@@ -67,6 +69,7 @@ export default class FileSizePreloader {
       // Oops! Discard that path, and don't increment the index before
       // moving on, since the next path will now be in its place.
       this.#paths.splice(this.#loadedPathIndex + 1, 1);
+      this.hasErrored = true;
       logWarn`Failed to process file size for ${path}: ${error.message}`;
       return this.#loadNextPath();
     }