From 536ec14b93917030701b088d2244fd9af9e8a48b Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Sat, 20 Apr 2019 20:33:50 -0400 Subject: [PATCH] dashboard-domain.js: perform callback only if update successful --- frontend/js/dashboard-domain.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/js/dashboard-domain.js b/frontend/js/dashboard-domain.js index 5b996d7..ac11ac4 100644 --- a/frontend/js/dashboard-domain.js +++ b/frontend/js/dashboard-domain.js @@ -120,14 +120,14 @@ }; global.post(global.origin + "/api/domain/update", json, function(resp) { - if (callback !== undefined) { - callback(resp.success); - } - if (!resp.success) { global.globalErrorShow(resp.message); return; } + + if (callback !== undefined) { + callback(resp.success); + } }); }