1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

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

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) {