diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-12-11 11:53:22 -0600 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-12-11 11:53:22 -0600 |
| commit | 5680371ea44af2bd576e9b936c9e43ee5ab47376 (patch) | |
| tree | 9691d493e42d28c754dc9bd6818e25cf326cb556 /StoneIsland/platforms/ios/www/js/lib/account/AccountView.js | |
| parent | eb16730a9bbce746e6f77451c46c3f3c0139e509 (diff) | |
0.3.5
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/account/AccountView.js')
| -rwxr-xr-x | StoneIsland/platforms/ios/www/js/lib/account/AccountView.js | 18 |
1 files changed, 12 insertions, 6 deletions
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 { |
