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:
parent
2d828be42d
commit
fc28fe86a8
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue