From c7229d5db18fc4f83ffe87d94d9bc0f28027aaf9 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Thu, 29 Sep 2022 13:31:58 -0400 Subject: [PATCH] Simplify front-end error-clearing logic. --- undercover/templates/writing.jinja2 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/undercover/templates/writing.jinja2 b/undercover/templates/writing.jinja2 index 7111e46..9ae10ce 100644 --- a/undercover/templates/writing.jinja2 +++ b/undercover/templates/writing.jinja2 @@ -32,7 +32,7 @@ const clearErrors = () => { const e = document.getElementById('letter_errors') - e.parentNode.removeChild(e) + e?.parentNode.removeChild(e) } {% endblock head %} @@ -106,11 +106,7 @@ Generate PDF