summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/account/AccountView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-11 11:33:44 -0600
committerJules Laplace <jules@okfoc.us>2015-12-11 11:33:44 -0600
commiteb16730a9bbce746e6f77451c46c3f3c0139e509 (patch)
treecb3dd444094ba60d27bceaa7a01d90eadb87a3e5 /StoneIsland/www/js/lib/account/AccountView.js
parentaa5a9b7c7cd52a69f8dd1d0cdc15475e113e6da0 (diff)
profile shit and faq links
Diffstat (limited to 'StoneIsland/www/js/lib/account/AccountView.js')
-rwxr-xr-xStoneIsland/www/js/lib/account/AccountView.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/StoneIsland/www/js/lib/account/AccountView.js b/StoneIsland/www/js/lib/account/AccountView.js
index 1c5c9f16..7d3b719a 100755
--- a/StoneIsland/www/js/lib/account/AccountView.js
+++ b/StoneIsland/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 {