Skip to content

Commit

Permalink
Prevent context matching if the oldContext is unset.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Feb 27, 2018
1 parent dc7c598 commit d964229
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 d964229

Please sign in to comment.