mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:17:35 +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:
parent
ad8183beb4
commit
609a89cfb0
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ JS::ThrowCompletionOr<JS::GCPtr<Node>> TreeWalker::next_node()
|
||||||
node = *node->first_child();
|
node = *node->first_child();
|
||||||
|
|
||||||
// 2. Set result to the result of filtering node within this.
|
// 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 this’s current to node and return node.
|
// 3. If result is FILTER_ACCEPT, then set this’s current to node and return node.
|
||||||
if (result == NodeFilter::FILTER_ACCEPT) {
|
if (result == NodeFilter::FILTER_ACCEPT) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue