Don't hit the API if there aren't any staged changes

This commit is contained in:
rijkvanzanten
2021-05-28 18:44:48 -04:00
parent 5877b82be3
commit 2ce26c1116

View File

@@ -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);