diff --git a/crates/ui/src/svg_img.rs b/crates/ui/src/svg_img.rs index b580f56a..404b04c9 100644 --- a/crates/ui/src/svg_img.rs +++ b/crates/ui/src/svg_img.rs @@ -265,7 +265,17 @@ impl Element for SvgImg { }), ) } - None => ((layout_id, None), None), + None => { + let task = load_svg(source, window, cx); + ( + (layout_id, None), + Some(SvgImgState { + hash: source_hash, + image: None, + task, + }), + ) + } } }) }