File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >9.9.1-beta05 </Version >
4+ <Version >9.9.1-beta06 </Version >
55 </PropertyGroup >
66
77 <ItemGroup >
Original file line number Diff line number Diff line change @@ -9,9 +9,6 @@ export function init(options) {
99 downlink, networkType : effectiveType , rTT : rtt
1010 } ) ;
1111 }
12- navigator . connection . onchange = e => {
13- updateState ( e . target ) ;
14- }
1512
1613 const onlineStateChanged = ( ) => {
1714 const indicators = [ ...document . querySelectorAll ( '.bb-nt-indicator' ) ] ;
@@ -31,5 +28,13 @@ export function init(options) {
3128 EventHandler . on ( window , 'offline' , offlineStateChanged ) ;
3229 } ) ;
3330
34- updateState ( navigator . connection ) ;
31+ if ( navigator . connection ) {
32+ navigator . connection . onchange = e => {
33+ updateState ( e . target ) ;
34+ }
35+ updateState ( navigator . connection ) ;
36+ }
37+ else {
38+ console . warn ( 'navigator.connection not supported in browser' ) ;
39+ }
3540}
You can’t perform that action at this time.
0 commit comments