this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: fall back to image_boxes[0] for legacy rects with empty src

Rects drawn before src was stored correctly have src="". Without this
fallback, img_idx was None and the dark overlay block was never entered,
so review showed the plain image with no rectangle obscured.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+7 -1
+7 -1
crates/tala/src/main.rs
··· 2068 2068 .map_err(|e| e.to_string())?; 2069 2069 2070 2070 let img_names = extract_img_names(source); 2071 - let img_idx = img_names.iter().position(|n| n == img_src); 2071 + // Fall back to index 0 for legacy rects stored with empty src. 2072 + let img_idx = if img_src.is_empty() { 2073 + if result.image_boxes.is_empty() { None } else { Some(0) } 2074 + } else { 2075 + img_names.iter().position(|n| n == img_src) 2076 + .or_else(|| if result.image_boxes.is_empty() { None } else { Some(0) }) 2077 + }; 2072 2078 2073 2079 let mut straight: Vec<u8> = result 2074 2080 .rgba