From e63996bb61bae542ba50923cdb0084cf49ae911e Mon Sep 17 00:00:00 2001 From: jude Date: Sun, 30 Jul 2023 15:36:58 +0100 Subject: [PATCH] Fix create template not testing for errors --- web/static/js/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/static/js/main.js b/web/static/js/main.js index b3372ae..6624c5d 100644 --- a/web/static/js/main.js +++ b/web/static/js/main.js @@ -823,6 +823,14 @@ $createTemplateBtn.addEventListener("click", async () => { ]; let reminder = await serialize_reminder($createReminder, "template"); + if (reminder.error) { + show_error(reminder.error); + $createTemplateBtn.querySelector("span.icon > i").classList = [ + "fas fa-file-spreadsheet", + ]; + return; + } + let guild = guildId(); fetch(`/dashboard/api/guild/${guild}/templates`, {