From b90b4035aa279915f75e3d5149f4353457581fdd Mon Sep 17 00:00:00 2001 From: Senad Uka Date: Sat, 28 Mar 2015 06:05:16 +0100 Subject: [PATCH] fixed bug with address from a logged in user staying after logout --- front-ui/app/stores/cartStore.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/front-ui/app/stores/cartStore.js b/front-ui/app/stores/cartStore.js index af61827..cf07d6f 100644 --- a/front-ui/app/stores/cartStore.js +++ b/front-ui/app/stores/cartStore.js @@ -41,16 +41,16 @@ var loadCart = function() { success: function() { CartActions.dataLoaded(); } - }) - if (!_deliveryDestination.get('id')) { - _deliveryDestination.fetch({ + }); + + _deliveryDestination.fetch({ success: function() { validateDeliveryDestinationForm(); fetchPlace(); CartActions.dataLoaded(); } - }); - } + }); + };