mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/609a89cfb0 Pull-request: https://github.com/SerenityOS/serenity/pull/17200 Reviewed-by: https://github.com/trflynn89 ✅
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();
|
||||
|
||||
// 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.
|
||||
if (result == NodeFilter::FILTER_ACCEPT) {
|
||||
|
|
Loading…
Reference in a new issue