forked from 1b-agent/opencadstudio-upstream
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:
2 files changed
+19
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user