« get me outta code hell

upd8: cleanup & new --show-step-summary CLI option - 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:
author(quasar) nebula <qznebula@protonmail.com>2023-10-27 18:50:32 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-27 18:50:32 -0300
commit940b2cbf8b68eb0b446cca0feeb507840c486394 (patch)
tree099fe3f00fd34c95ddbcba57baf1ec388a4760c8 /src/file-size-preloader.js
parent991386372f418b165a192a3ad36fb9b6cecc4d76 (diff)
upd8: cleanup & new --show-step-summary CLI option
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 38e60e6..4eadde7 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();
     }