From 9a5bcf290d53f1def9d689831c32c8c4ea3fc6b2 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 1 Feb 2022 01:50:22 +0100 Subject: [PATCH] Retain mculture when clicking results from global search (#7192) --- .../src/common/services/navigation.service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index c8553ec02a..b586d50d89 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -259,8 +259,8 @@ function navigationService($routeParams, $location, $q, $injector, eventsService var updated = false; retainedQueryStrings.forEach(r => { - // if mculture is set to null in nextRouteParams, the value will be undefined and we will not retain any query string that has a value of "null" - if (currRouteParams[r] && nextRouteParams[r] !== undefined && !nextRouteParams[r]) { + // testing explicitly for undefined in nextRouteParams here, as it must be possible to "unset" e.g. mculture by specifying a null value + if (currRouteParams[r] && nextRouteParams[r] === undefined) { toRetain[r] = currRouteParams[r]; updated = true; }