Merge pull request #2337 from Matt-Yorkley/uk/modal_fix

Fix guest checkout login modal
This commit is contained in:
Pau Pérez Fabregat
2018-06-04 09:56:00 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
submit: =>
Loading.message = t 'submitting_order'
$http.put('/checkout.json', {order: @preprocess()}).success (data, status)=>
Navigation.go data.path
Navigation.goWithoutHashFragments data.path
.error (response, status)=>
if response.path
Navigation.go response.path

View File

@@ -16,6 +16,10 @@ Darkswarm.factory 'Navigation', ($location, $window) ->
else
@navigate(path)
goWithoutHashFragments: (path) ->
# Redirects to specified path, without Angular hash fragments such as '#/login'
$window.location.href = $window.location.origin + path
go: (path)->
if path.match /^http/
$window.location.href = path