When dispatching a GoAction with a relative path, the following exception is thrown:
Error: Microsoft.AspNetCore.Components.LocationChangeException: An exception occurred while dispatching a location changed event.
---> System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at Fluxor.Blazor.Web.Middlewares.Routing.UrlComparer.AreEqual(String first, String second) in C:\Data\Mine\Code\Fluxor\Source\Lib\Fluxor.Blazor.Web\Middlewares\Routing\UrlComparer.cs:line 8
at Fluxor.Blazor.Web.Middlewares.Routing.RoutingMiddleware.LocationChanged(Object sender, LocationChangedEventArgs e) in C:\Data\Mine\Code\Fluxor\Source\Lib\Fluxor.Blazor.Web\Middlewares\Routing\RoutingMiddleware.cs:line 47
at Microsoft.AspNetCore.Components.NavigationManager.NotifyLocationChanged(Boolean isInterceptedLink)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Components.NavigationManager.NotifyLocationChanged(Boolean isInterceptedLink)
at Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost.<>c__DisplayClass51_0.<OnLocationChangedAsync>b__1()
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<InvokeAsync>g__Execute|8_0(ValueTuple`3 state)
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost.OnLocationChangedAsync(String uri, String state, Boolean intercepted)
This is due to a recent change with commit 440c592d06982d8b068bdab67aa305355cea895d.
The code introduced the new assumption that the two parts are always valid URIs. When using a relative path, this causes issues.
This fix ensures that only absolute paths are compared.
When dispatching a GoAction with a relative path, the following exception is thrown:
This is due to a recent change with commit 440c592d06982d8b068bdab67aa305355cea895d.
The code introduced the new assumption that the two parts are always valid URIs. When using a relative path, this causes issues.
This fix ensures that only absolute paths are compared.
Created PR #496