Fix: Deleted image zooms out to (0, 0) upon closing Lightbox (#10154)

* fix: when the lightbox active image is deleted in editor, it zooms out to (0, 0) upon closing lightbox

* Update Lightbox.tsx

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
Apoorv MishraandTom Moor authored and GitHub committed 2025-09-13 11:49:03 +00:00
1 parent 24c01b1a9a
commit fc469ef9c2
1 file changed
+1 -1
+1 -1
View File
@@ -291,7 +291,7 @@ function Lightbox({ onUpdate, activePos }: Props) {
// in editor
const editorImageEl = imageElements[currentImageIndex];
let to;
if (editorImageEl) {
if (editorImageEl?.isConnected) {
const editorImgDOMRect = editorImageEl.getBoundingClientRect();
const {
top: editorImgTop,