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