Skip to content

Commit 6bc0978

Browse files
Code style: go back to .AsTask - it's probably easier to read
1 parent 40ca1eb commit 6bc0978

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/ExampleJsInterop.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public class ExampleJsInterop : IAsyncDisposable
1717

1818
public ExampleJsInterop(IJSRuntime jsRuntime)
1919
{
20-
moduleTask = new (async () => await jsRuntime.InvokeAsync<IJSObjectReference>(
21-
"import", "./_content/Company.RazorClassLibrary1/exampleJsInterop.js"));
20+
moduleTask = new (() => jsRuntime.InvokeAsync<IJSObjectReference>(
21+
"import", "./_content/Company.RazorClassLibrary1/exampleJsInterop.js").AsTask());
2222
}
2323

2424
public async ValueTask<string> Prompt(string message)

0 commit comments

Comments
 (0)