From 2ce26c1116c7bff11e091905727044b04ea04b40 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Fri, 28 May 2021 18:44:48 -0400 Subject: [PATCH] Don't hit the API if there aren't any staged changes --- app/src/modules/insights/routes/dashboard.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/modules/insights/routes/dashboard.vue b/app/src/modules/insights/routes/dashboard.vue index 18a969ab2b..d67ccf9e9d 100644 --- a/app/src/modules/insights/routes/dashboard.vue +++ b/app/src/modules/insights/routes/dashboard.vue @@ -257,6 +257,11 @@ export default defineComponent({ async function saveChanges() { if (!currentDashboard.value) return; + if (stagedPanels.value.length === 0) { + editMode.value = false; + return; + } + saving.value = true; const currentIDs = currentDashboard.value.panels.map((panel) => panel.id);