Skip to content

Commit 9b0c89c

Browse files
authored
feat(templates): use Bswup.skipWaiting in force-update process of Boilerplate #10922 (#10923)
1 parent a1092c7 commit 9b0c89c

File tree

1 file changed

+8
-3
lines changed
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Scripts

1 file changed

+8
-3
lines changed

src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Scripts/app.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,14 @@ class App {
7575
};
7676
//#endif
7777

78-
public static forceUpdate() {
79-
(window as any).BitBswupProgress.config({ autoReload: true });
80-
(window as any).BitBswup.checkForUpdate();
78+
public static async forceUpdate() {
79+
const bswup = (window as any).BitBswup;
80+
const bswupProgress = (window as any).BitBswupProgress;
81+
82+
if (await bswup.skipWaiting()) return;
83+
84+
bswupProgress.config({ autoReload: true });
85+
bswup.checkForUpdate();
8186
}
8287
}
8388

0 commit comments

Comments
 (0)