Merge pull request #4710 from umbraco/temp8-4708-fix-for-exit-preview-with-null-culture

Fix for exit preview with null culture

(cherry picked from commit 9b25cdaa14)
This commit is contained in:
Robert
2019-03-12 08:31:28 +01:00
committed by Sebastiaan Janssen
parent 3961e2533d
commit b0b987f9cd

View File

@@ -113,7 +113,12 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi
$scope.exitPreview = function () {
var culture = $location.search().culture || getParameterByName("culture");
var relativeUrl = "/" + $scope.pageId +'?culture='+ culture;
var relativeUrl = "/" + $scope.pageId;
if(culture){
relativeUrl +='?culture='+ culture;
}
window.top.location.href = "../preview/end?redir=" + encodeURIComponent(relativeUrl);
};