mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: use correct error if fault fn missing (#5688)
This commit is contained in:
@ -108,9 +108,9 @@ impl JsInspector {
|
||||
.get("fault", &mut ctx)?
|
||||
.as_object()
|
||||
.cloned()
|
||||
.ok_or(JsInspectorError::ResultFunctionMissing)?;
|
||||
.ok_or(JsInspectorError::FaultFunctionMissing)?;
|
||||
if !result_fn.is_callable() {
|
||||
return Err(JsInspectorError::ResultFunctionMissing)
|
||||
return Err(JsInspectorError::FaultFunctionMissing)
|
||||
}
|
||||
|
||||
let enter_fn = obj.get("enter", &mut ctx)?.as_object().cloned().filter(|o| o.is_callable());
|
||||
|
||||
Reference in New Issue
Block a user