You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works well enough with one invalid route (aka a route missing a :param) but if the user specifies multiple invalid routes, the current one in the routes object is replaced by the new one. This is because utils.getRouteType returns null for both, and so they match. Hence, utils.getRoute returns the current invalid route, which is assigned to currentRoute, and hence replaced by the new invalid route.
Instead of trying to fix this, I believe it would be better to just disallow users from adding invalid routes with an assert. Thoughts?
The text was updated successfully, but these errors were encountered:
This is with regards to the commit 7c4c65e.
It works well enough with one invalid route (aka a route missing a
:param
) but if the user specifies multiple invalid routes, the current one in the routes object is replaced by the new one. This is becauseutils.getRouteType
returnsnull
for both, and so they match. Hence,utils.getRoute
returns the current invalid route, which is assigned tocurrentRoute
, and hence replaced by the new invalid route.Instead of trying to fix this, I believe it would be better to just disallow users from adding invalid routes with an assert. Thoughts?
The text was updated successfully, but these errors were encountered: