From b8571bd3e49e9e654c1daa351b2ac742121cf312 Mon Sep 17 00:00:00 2001 From: Nathan Hammond Date: Fri, 23 Feb 2018 16:41:22 -0800 Subject: [PATCH] Prevent context matching if the oldContext is null All existing tests still pass. It's not possible to test this particular issue without migrating the entire test suite off of Backburner. --- lib/router/transition-intent/named-transition-intent.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/router/transition-intent/named-transition-intent.js b/lib/router/transition-intent/named-transition-intent.js index 37e3147a..4ff82c8b 100644 --- a/lib/router/transition-intent/named-transition-intent.js +++ b/lib/router/transition-intent/named-transition-intent.js @@ -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