Skip to content

Commit 6ad8917

Browse files
committed
feat: Adjust progress bar behavior
1 parent ad2be3e commit 6ad8917

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly/Bootstrapper.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,11 @@ namespace Uno.WebAssembly.Bootstrap {
278278
}
279279

280280
private reportDownloadResourceProgress(resourcesLoaded: number, totalResources: number) {
281-
282-
this.progress.max = totalResources;
283-
(<any>this.progress).value = resourcesLoaded;
281+
// The totalResources value reported by .NET does not represent
282+
// the actual total. To prevent progress bar from jumping
283+
// setting the max progress to 100 instead.
284+
this.progress.max = 100;
285+
(<any>this.progress).value = Math.min(resourcesLoaded, 100);
284286
}
285287

286288
private initProgress() {

0 commit comments

Comments
 (0)