File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/BootstrapBlazor/Extensions Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,21 @@ public static class JSModuleExtensions
2525 /// <returns>A <see cref="Task"/><![CDATA[<]]><see cref="JSModule"/><![CDATA[>]]> 模块加载器</returns>
2626 public static async Task < JSModule > LoadModule ( this IJSRuntime jsRuntime , string fileName , string ? version = null )
2727 {
28- JSModule ? module = null ;
2928 if ( ! string . IsNullOrEmpty ( version ) )
3029 {
3130 fileName = $ "{ fileName } ?v={ version } ";
3231 }
32+
33+ JSModule ? module ;
3334 try
3435 {
3536 var jSObjectReference = await jsRuntime . InvokeAsync < IJSObjectReference > ( identifier : "import" , fileName ) ;
3637 module = new JSModule ( jSObjectReference ) ;
3738 }
38- catch ( Exception ) { }
39+ catch ( Exception )
40+ {
41+ throw ;
42+ }
3943 return module ?? new JSModule ( null ) ;
4044 }
4145
You can’t perform that action at this time.
0 commit comments