From 3410f07a779bd001369adc23cb4c9b2615841510 Mon Sep 17 00:00:00 2001 From: Aaron Meese Date: Mon, 6 Jun 2022 18:48:35 -0400 Subject: [PATCH] Rudimentary error handling An unknown modal element is supposedly lacking a description, so in an attempt to circumvent the issue and determine the root cause I am going to simply return an empty element in that scenario. --- src/templates/Modal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/templates/Modal.tsx b/src/templates/Modal.tsx index 0a056d3..a376488 100644 --- a/src/templates/Modal.tsx +++ b/src/templates/Modal.tsx @@ -9,6 +9,7 @@ import { Theme } from "@rebass/preset"; // @ts-ignore const Modal = ({ location }) => { + if (!location.state) return <>; const content = ; return