Skip to content

Commit

Permalink
Prevent context matching if the oldContext is null
Browse files Browse the repository at this point in the history
All existing tests still pass. It's not possible to test this particular issue without migrating the entire test suite off of Backburner.
  • Loading branch information
nathanhammond committed Feb 24, 2018
1 parent 5b08deb commit b8571bd
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
&& oldContext !== null
&& 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 b8571bd

Please sign in to comment.