summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/_router.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/_router.js')
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/_router.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js
index 91f29b55..75f598e9 100755
--- a/StoneIsland/platforms/ios/www/js/lib/_router.js
+++ b/StoneIsland/platforms/ios/www/js/lib/_router.js
@@ -40,7 +40,14 @@ var SiteRouter = Router.extend({
'/cart/error': 'cart.error',
},
- terms_routes: ['terms','account_terms','privacy','returns','care','logout'],
+ terms_routes: [
+ 'terms',
+ 'account_terms',
+ 'privacy',
+ 'returns',
+ 'care',
+ 'logout',
+ ],
initialize: function(){
var fn
@@ -105,8 +112,11 @@ var SiteRouter = Router.extend({
// return
// }
- var isTermsRoute = this.terms_routes.indexOf(name) !== -1
- if (app.demand_consent && !isTermsRoute && app.account.consent.check()) {
+ var isNotTermsRoute = this.terms_routes.indexOf(name) === -1
+ var isCartRoute = n[0] === 'cart'
+ var userMightActuallyViewCart = isCartRoute && auth.logged_in()
+ var demandingConsent = app.demand_consent && isNotTermsRoute
+ if ((userMightActuallyViewCart || demandingConsent) && app.account.consent.check()) {
console.log('showed consent modal')
return
}