From 5680371ea44af2bd576e9b936c9e43ee5ab47376 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 11 Dec 2015 11:53:22 -0600 Subject: 0.3.5 --- .../platforms/ios/www/js/lib/account/AccountView.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js/lib/account/AccountView.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js index 1c5c9f16..7d3b719a 100755 --- a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js +++ b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js @@ -99,12 +99,18 @@ var AccountView = View.extend({ if ( ! auth.has_cart() ) { app.curtain.show("loading") auth.create_cart(function(){ - auth.add_deferred_product_to_cart(function(){ - app.router.go("cart") - setTimeout(function(){ - app.curtain.hide("loading") - }, 500) - }) + if (auth.deferred_product) { + auth.add_deferred_product_to_cart(function(){ + app.router.go("cart") + setTimeout(function(){ + app.curtain.hide("loading") + }, 500) + }) + } + else { + app.router.go("account/profile") + app.curtain.hide("loading") + } }) } else { -- cgit v1.2.3-70-g09d2