diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-29 09:26:59 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-29 09:26:59 -0300 |
commit | bfa1953e79a562ee675940b7acc52b5b29d22d8f (patch) | |
tree | 5c1cd2f4050c801a60f4b65b367a714ed0979759 /src/file-size-preloader.js | |
parent | c4ef4ced62d659d217873c6c48dd8038dbf765af (diff) | |
parent | 940b2cbf8b68eb0b446cca0feeb507840c486394 (diff) |
Merge branch 'preview' into listing-tweaks
Diffstat (limited to 'src/file-size-preloader.js')
-rw-r--r-- | src/file-size-preloader.js | 3 |
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(); } |