Skip to content

Commit

Permalink
Bugfix: Fragment LoadStats total set to 0 with progressive: true
Browse files Browse the repository at this point in the history
Fixes #5050
  • Loading branch information
Rob Walch committed Nov 23, 2022
1 parent 624110a commit 0b2975b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/fetch-loader.ts
Expand Up @@ -133,7 +133,10 @@ class FetchLoader implements Loader<LoaderContext> {
self.performance.now(),
stats.loading.first
);
stats.loaded = stats.total = responseData[LENGTH];
const total = responseData[LENGTH];
if (total) {
stats.loaded = stats.total = total;
}

const loaderResponse = {
url: response.url,
Expand Down

0 comments on commit 0b2975b

Please sign in to comment.