fix(linter): panic in get_enclosing_function (#4121)

Fixes one of the panics described in #4111
This commit is contained in:
DonIsaac 2024-07-09 02:59:08 +00:00
parent 3a0f2aa7ef
commit 2334515247

View file

@ -201,7 +201,7 @@ pub fn get_enclosing_function<'a, 'b>(
{ {
return Some(current_node); return Some(current_node);
} }
current_node = ctx.nodes().parent_node(current_node.id()).unwrap(); current_node = ctx.nodes().parent_node(current_node.id())?;
} }
} }