File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/Components/Components/src/Routing Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ internal async Task<bool> RunOnNavigateAsync(string path)
200
200
// then we render the component associated with the route as per usual.
201
201
if ( ! OnNavigateAsync . HasDelegate )
202
202
{
203
- return await Task . FromResult ( true ) ;
203
+ return true ;
204
204
}
205
205
206
206
// If we've already invoked a task and stored its CTS, then
@@ -226,11 +226,7 @@ internal async Task<bool> RunOnNavigateAsync(string path)
226
226
}
227
227
228
228
var completedTask = await Task . WhenAny ( task , cancellationTcs . Task ) ;
229
- if ( completedTask == task )
230
- {
231
- return await Task . FromResult ( true ) ;
232
- }
233
- return await Task . FromResult ( false ) ;
229
+ return task == completedTask ;
234
230
}
235
231
236
232
private async Task RunOnNavigateWithRefreshAsync ( string path , bool isNavigationIntercepted )
You can’t perform that action at this time.
0 commit comments