Skip to content

Commit 5de3f67

Browse files
committed
refactor: 更新加载逻辑
1 parent c45180a commit 5de3f67

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/BootstrapBlazor/Services/Serial/DefaultSerialService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ public DefaultSerialService(IJSRuntime jsRuntime)
2727

2828
private async Task<JSModule> LoadModule()
2929
{
30-
var module = await _runtime.LoadModule("./_content/BootstrapBlazor/modules/serial.js")
31-
?? throw new InvalidOperationException("Load serial module failed");
30+
var module = await _runtime.LoadModule("./_content/BootstrapBlazor/modules/serial.js");
3231

3332
IsSupport = await module.InvokeAsync<bool>("init", _serialPortId);
3433
return module;

0 commit comments

Comments
 (0)