Skip to content

Commit 6e12150

Browse files
Apply suggestions from code review
Co-authored-by: Pranav K <[email protected]>
1 parent 27f8e31 commit 6e12150

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Components/Components/src/Routing/Router.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ internal virtual void Refresh(bool isNavigationIntercepted)
192192
}
193193
}
194194

195-
private async ValueTask<bool> RunOnNavigateAsync(string path, Task prevOnNavigate)
195+
private async ValueTask<bool> RunOnNavigateAsync(string path, Task previousOnNavigate)
196196
{
197197
// If this router instance does not provide an OnNavigateAsync parameter
198198
// then we render the component associated with the route as per usual.
@@ -206,7 +206,7 @@ private async ValueTask<bool> RunOnNavigateAsync(string path, Task prevOnNavigat
206206
_onNavigateCts?.Cancel();
207207
// Then make sure that the task has been completed cancelled or
208208
// completed before continuing with the execution of this current task.
209-
await prevOnNavigate;
209+
await previousOnNavigate;
210210

211211
// Create a new cancellation token source for this instance
212212
_onNavigateCts = new CancellationTokenSource();

src/Components/Components/test/Routing/RouterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async Task OnNavigateAsync(NavigationContext args)
7979
router.Object.RunOnNavigateWithRefreshAsync("feb", false);
8080

8181
// Assert refresh should've only been called once for the second route
82-
router.Verify(x => x.Refresh(It.IsAny<bool>()), Times.Once());
82+
router.Verify(x => x.Refresh(false), Times.Once());
8383
}
8484

8585
private Mock<Router> CreateMockRouter()

0 commit comments

Comments
 (0)