Skip to content

Commit f59a526

Browse files
authored
fix(bswup): resolve error of BSWUP force-start when there is no SW available #10767 (#10768)
1 parent d2a66f5 commit f59a526

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ const BswupMessage = {
193193
return warn('no "autostart=false" found on the blazor script tag!');
194194
}
195195

196-
if (navigator.serviceWorker.controller || forceStart) {
196+
if (navigator?.serviceWorker?.controller || forceStart) {
197197
Blazor.start();
198198
}
199199
}

0 commit comments

Comments
 (0)