diff --git a/src/main.rs b/src/main.rs index 47ae393..9c5ab7d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -447,12 +447,12 @@ fn write_item(dom:&rbx_dom_weak::WeakDom,mut file:std::path::PathBuf,node:&TreeN return Ok(()) } assert!(file.set_extension("lua"),"could not set extension"); - assert!(dom.get_by_ref(node.referent).is_some_and(|item|{ + if let Some(item)=dom.get_by_ref(node.referent){ //TODO: delete disabled scripts if let Some(rbx_dom_weak::types::Variant::String(source))=item.properties.get("Source"){ - std::fs::write(file,source).is_ok() - }else{false} - }),"no string property or file failed to write"); + std::fs::write(file,source)?; + } + } }, Class::Model=>{ if !write_models{