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's being compared against prevPath which is indrectly being set here using Router.current().url
Very undependable results happen with these two API calls when the current route has a parameterized path.
Often Router.current().url returns a full url and sometimes it returns a path.
Often Router.current().route.path() returns the path and sometimes is returns a null.
The latter two cases both cause the resetPwd/:token redirect route to break.
Why do these two return undependable results:
The function signature for path allows for passing params and options. If you call without params then these two lines of code in iron-router urls.js break when there is a named parameter.
Long story short, I will file a bug with iron-router but since that project is very inactive it might be best to use Iron.Location.get() instead of waiting for bugfix. Iron.Location.get() seems to more consistently return the right path. At the very least the API method used to get the current path in the two spots in useraccounts/iron-routing should probably be the same.
The text was updated successfully, but these errors were encountered:
funkyeah
changed the title
postSubmitRedirect relies on deprecated iron-router call
postSubmitRedirect compares paths gotten through two different iron-router APIs
Feb 21, 2016
In the postSubmitRedirect Router.current().route.path is used.
It's being compared against prevPath which is indrectly being set here using Router.current().url
Very undependable results happen with these two API calls when the current route has a parameterized path.
Often Router.current().url returns a full url and sometimes it returns a path.
Often Router.current().route.path() returns the path and sometimes is returns a
null
.The latter two cases both cause the resetPwd/:token redirect route to break.
Why do these two return undependable results:
The function signature for path allows for passing
params
andoptions
. If you call without params then these two lines of code in iron-router urls.js break when there is a named parameter.Long story short, I will file a bug with iron-router but since that project is very inactive it might be best to use Iron.Location.get() instead of waiting for bugfix. Iron.Location.get() seems to more consistently return the right path. At the very least the API method used to get the current path in the two spots in useraccounts/iron-routing should probably be the same.
The text was updated successfully, but these errors were encountered: