From fc28fe86a8326da5fd6af30dae422cc4d202cdf9 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Sat, 17 Aug 2019 10:32:24 -0400 Subject: [PATCH] console error instead of throwing so the app doesn't crash if it can't find the wrapper class... which... shouldn't(?) happen but it is --- src/ui/component/fileViewer/view.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/component/fileViewer/view.jsx b/src/ui/component/fileViewer/view.jsx index e7efd4979..c306df535 100644 --- a/src/ui/component/fileViewer/view.jsx +++ b/src/ui/component/fileViewer/view.jsx @@ -84,7 +84,8 @@ export default function FileViewer(props: Props) { function handleResize() { const element = document.querySelector(`.${FILE_WRAPPER_CLASS}`); if (!element) { - throw new Error("Can't find file viewer wrapper to attach to"); + console.error("Can't find file viewer wrapper to attach to the inline viewer to"); + return; } const rect = element.getBoundingClientRect();