Skip to content

Commit

Permalink
Merge pull request #101 from stephansum/master
Browse files Browse the repository at this point in the history
Use proper js invocation return type within ResizeListener.Start

This is legacy code from .NET 3.0 before InvokeVoidAsync was added to the API. Since this method is abstracted by the service it should not cause any breaking changes to remove the unused return type.
  • Loading branch information
EdCharbeneau authored Aug 22, 2024
2 parents 38b81b1 + 6be5450 commit 8e0ecfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BlazorSize/Resize/ResizeListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ private void Subscribe(EventHandler<BrowserWindowSize>? value)
onResized += value;
}

private async ValueTask<bool> Start()
private async ValueTask Start()
{
var module = await moduleTask.Value;
return await module.InvokeAsync<bool>("listenForResize", DotNetObjectReference.Create(this), options);
await module.InvokeVoidAsync("listenForResize", DotNetObjectReference.Create(this), options);
}

private async ValueTask Cancel()
Expand Down

0 comments on commit 8e0ecfa

Please sign in to comment.