Skip to content

Commit

Permalink
Prevent mid-transition checks from reassigning params.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond authored and Nathan Hammond committed Feb 27, 2018
1 parent ae0d680 commit 649954f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/router/transition-intent/named-transition-intent.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ export default class NamedTransitionIntent extends TransitionIntent {
newHandlerInfo.context
);
var oldContext = oldHandlerInfo && oldHandlerInfo.context;
if (result.names.length > 0 && newHandlerInfo.context === oldContext) {
if (
result.names.length > 0 &&
oldHandlerInfo.hasOwnProperty('context') &&
newHandlerInfo.context === oldContext
) {
// If contexts match in isActive test, assume params also match.
// This allows for flexibility in not requiring that every last
// handler provide a `serialize` method
Expand Down

0 comments on commit 649954f

Please sign in to comment.