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

This commit is contained in:
Sean Yesmunt 2019-08-17 10:32:24 -04:00
parent 2d828be42d
commit fc28fe86a8

View file

@ -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();