Guard refs that fail measure
This commit is contained in:
@@ -57,7 +57,11 @@ export function ImageEmbed({
|
|||||||
'worklet'
|
'worklet'
|
||||||
const rects: (MeasuredDimensions | null)[] = []
|
const rects: (MeasuredDimensions | null)[] = []
|
||||||
for (const r of refs) {
|
for (const r of refs) {
|
||||||
|
try {
|
||||||
rects.push(measure(r))
|
rects.push(measure(r))
|
||||||
|
} catch {
|
||||||
|
rects.push(null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
runOnJS(_openLightbox)(index, rects, fetchedDims)
|
runOnJS(_openLightbox)(index, rects, fetchedDims)
|
||||||
})()
|
})()
|
||||||
|
|||||||
Reference in New Issue
Block a user