File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/BootstrapBlazor/Services Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ public DefaultNetowrkMonitorService(IJSRuntime jsRuntime)
3434 /// <summary>
3535 /// <inheritdoc/>
3636 /// </summary>
37- public async Task < NetworkMonitorState > GetNetworkMonitorState ( CancellationToken token = default )
37+ public async Task < NetworkMonitorState ? > GetNetworkMonitorState ( CancellationToken token = default )
3838 {
3939 _module ??= await LoadModule ( ) ;
40- return await _module . InvokeAsync < NetworkMonitorState ? > ( "getNetworkInfo" , token ) ?? new ( ) ;
40+ return await _module . InvokeAsync < NetworkMonitorState ? > ( "getNetworkInfo" , token ) ;
4141 }
4242
4343 /// <summary>
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public interface INetworkMonitorService
1616 /// <param name="token">A cancellation token that can be used to cancel the operation.</param>
1717 /// <returns>A task representing the asynchronous operation. The task result contains the current <see
1818 /// cref="NetworkMonitorState"/>.</returns>
19- Task < NetworkMonitorState > GetNetworkMonitorState ( CancellationToken token = default ) ;
19+ Task < NetworkMonitorState ? > GetNetworkMonitorState ( CancellationToken token = default ) ;
2020
2121 /// <summary>
2222 /// Registers a callback to be invoked when the network monitor state changes.
You can’t perform that action at this time.
0 commit comments