Remove an incorrect `RouteMap|RouteMetadata => RouteMap` cast
When traversing the RouteMap there are three possibilities: - There is no route that matches the path segment - There is a child `RouteMap` that matches the path segment - There is a child `RouteMetadata` that matches the path segment, in which case we should only return it if we reached the end of the path Rewrite `findRouteMetadata` to handle these possibilities more explicitly. We already had tests that covered the expected behavior, this rewrite just avoid a cast which is technically incorrect.
Showing
Please register or sign in to comment