Skip to content

Commit ec0d697

Browse files
authored
chore: Fix incorrect function check in mod.rs (#257)
`self.enter_fn.is_some()` is used in the `can_call_exit` method to check for the presence of an entry function (`enter_fn`). This is incorrect, as the method should be checking for the exit function (`exit_fn`). I've fixed this by updating the check to `self.exit_fn.is_some()`. This aligns with the method's intended behavior.
1 parent f7e6249 commit ec0d697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tracing/js/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl JsInspector {
355355
/// Returns true if there's an exit function and the active call is not the root call.
356356
#[inline]
357357
fn can_call_exit(&mut self) -> bool {
358-
self.enter_fn.is_some() && !self.is_root_call_active()
358+
self.exit_fn.is_some() && !self.is_root_call_active()
359359
}
360360

361361
/// Pushes a new call to the stack

0 commit comments

Comments
 (0)