From e88dc0308741d8d8ba523669b6edeb15b7e9b452 Mon Sep 17 00:00:00 2001 From: Warren Lu Date: Mon, 15 Apr 2024 19:44:26 -0400 Subject: [PATCH] fix missing schema id --- siteManagerDashboard/notifications/storeNotifications.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/siteManagerDashboard/notifications/storeNotifications.js b/siteManagerDashboard/notifications/storeNotifications.js index fcc75f3..7e8f6ae 100644 --- a/siteManagerDashboard/notifications/storeNotifications.js +++ b/siteManagerDashboard/notifications/storeNotifications.js @@ -212,8 +212,9 @@ const handleFormSubmit = () => { const form = document.getElementById("configForm"); form.addEventListener("submit", async (e) => { e.preventDefault(); - const hasSchemaId = !!appState.getState().notification?.savedSchema?.id; let schema = {}; + schema.id = appState.getState().notification?.savedSchema?.id ?? ""; + const hasSchemaId = schema.id.length > 0; schema.isDraft = e.submitter.dataset.draft === "true"; schema["attempt"] = document.getElementById("attempt").value.trim(); schema["description"] = document.getElementById("description").value.trim();