mirror of
https://github.com/zadam/trilium.git
synced 2025-11-27 11:04:24 +01:00
chore(mermaid): avoid crash if "Matrix is not invertible"
This commit is contained in:
parent
2985c762e6
commit
6946da3571
@ -163,7 +163,12 @@ function useResizer(containerRef: RefObject<HTMLDivElement>, noteId: string, svg
|
|||||||
pan: zoomInstance.getPan(),
|
pan: zoomInstance.getPan(),
|
||||||
zoom: zoomInstance.getZoom()
|
zoom: zoomInstance.getZoom()
|
||||||
}
|
}
|
||||||
zoomInstance.destroy();
|
try {
|
||||||
|
zoomInstance.destroy();
|
||||||
|
} catch (e) {
|
||||||
|
// Sometimes crashes with "Matrix is not invertible" which can cause havoc such as breaking the popup editor from ever showing up again.
|
||||||
|
console.warn(e);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}, [ svg ]);
|
}, [ svg ]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user