From 3552281dab13fae5b1de85cc926325c4d457c478 Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 12 Oct 2022 16:04:10 +0530 Subject: [PATCH 1/2] call orders api only if needed --- src/PersonalSettings.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PersonalSettings.vue b/src/PersonalSettings.vue index bff823bb..a3f58851 100644 --- a/src/PersonalSettings.vue +++ b/src/PersonalSettings.vue @@ -96,7 +96,9 @@ export default { this.shopEmailDefault = loadState(this.appName, 'shop_email_post_delete') this.userEmail = loadState(this.appName, 'email') this.getShopUser().then(() => { - this.getOrdersInfo() + if(this.shopUserExists) { + this.getOrdersInfo() + } this.disableOrEnableDeleteAccount() }) } catch (e) { -- GitLab From ae4ca2b4c2b4d4b8c637ba5e06011c4769cc1b1a Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 12 Oct 2022 16:05:24 +0530 Subject: [PATCH 2/2] Fix lint --- src/PersonalSettings.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PersonalSettings.vue b/src/PersonalSettings.vue index a3f58851..ba188817 100644 --- a/src/PersonalSettings.vue +++ b/src/PersonalSettings.vue @@ -96,7 +96,7 @@ export default { this.shopEmailDefault = loadState(this.appName, 'shop_email_post_delete') this.userEmail = loadState(this.appName, 'email') this.getShopUser().then(() => { - if(this.shopUserExists) { + if (this.shopUserExists) { this.getOrdersInfo() } this.disableOrEnableDeleteAccount() -- GitLab