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
I think it would make sense to throw an error when the path is undefined in res.redirect. The current behavior redirects to /undefined, which I wouldn't consider very intuitive.
This functionality would be a breaking change, so it could be a candidate for Express 6. What do you all think?
The text was updated successfully, but these errors were encountered:
The current behavior redirects to /undefined, which I wouldn't consider very intuitive.
Agreed - that sounds like the kind of sneaky, unexpected behavior that is hard to debug. The path is also documented as required so an error would make sense (as a side note, I find it odd that the optional argument comes first for this method - that's not a great practice and most of the other methods don't do that).
(as a side note, I find it odd that the optional argument comes first for this method - that's not a great practice and most of the other methods don't do that)
Interesting that this was deprecated in v4 and removed in v5 (See #2941), it probably should never have been that way. I also find it just as strange that the optional argument is the first one.
I think it would make sense to throw an error when the path is undefined in res.redirect. The current behavior redirects to /undefined, which I wouldn't consider very intuitive.
This functionality would be a breaking change, so it could be a candidate for Express 6. What do you all think?
The text was updated successfully, but these errors were encountered: