Skip to content

Commit

Permalink
Merge pull request #4710 from umbraco/temp8-4708-fix-for-exit-preview…
Browse files Browse the repository at this point in the history
…-with-null-culture

Fix for exit preview with null culture

(cherry picked from commit 9b25cda)
  • Loading branch information
robert-cpl authored and nul800sebastiaan committed Mar 14, 2019
1 parent 3961e25 commit b0b987f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Umbraco.Web.UI.Client/src/preview/preview.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit b0b987f

Please sign in to comment.