Fail early when processing (test) nodes.
If a certain segment yields no nodes the on_path() method should not process any following segments.
This commit is contained in:
1 parent
d6aec6aa16
commit
56982dd543
2 files changed
+22
No files matched your search
@@ -61,6 +61,8 @@ module Oga
|
||||
|
||||
if test != last_node and !@stack.empty?
|
||||
swap_context
|
||||
elsif @stack.empty?
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user