Fix wasm32 build: gate the font download and XREF open call sites

crate::network and the open crate are desktop-only, but the community-font
download (font_repo.rs) and the XREF row Open action call them
unconditionally, so cargo check --target wasm32-unknown-unknown fails on
main. Gate both; on the web download_fonts returns an error, since the web
build has no network client or fonts folder.
This commit is contained in:
Helen Kwok committed 2026-09-18 15:18:54 +09:30
1 parent 472bb9883d
commit 000d8a1687
2 files changed
+19

No files matched your search

+1
View File
@@ -2482,6 +2482,7 @@ impl OpenCADStudio {
if is_dwg {
return self.update(Message::OpenRecent(std::path::PathBuf::from(found)));
} else {
#[cfg(not(target_arch = "wasm32"))]
let _ = open::that_detached(&found);
}
} else {