LibWeb: Correct logic in TreeWalker::next_node()

We were creating a new `result` variable here, when we should have been
assigning to the original one.
This commit is contained in:
Sam Atkins 2023-01-27 13:13:25 +00:00 committed by Jelle Raaijmakers
parent ad8183beb4
commit 609a89cfb0
Notes: sideshowbarker 2024-07-18 05:01:22 +09:00

View file

@ -187,7 +187,7 @@ JS::ThrowCompletionOr<JS::GCPtr<Node>> TreeWalker::next_node()
node = *node->first_child();
// 2. Set result to the result of filtering node within this.
auto result = TRY(filter(*node));
result = TRY(filter(*node));
// 3. If result is FILTER_ACCEPT, then set thiss current to node and return node.
if (result == NodeFilter::FILTER_ACCEPT) {