Skip to content

Commit 609a89c

Browse files
AtkinsSJgmta
authored andcommitted
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.
1 parent ad8183b commit 609a89c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Userland/Libraries/LibWeb/DOM/TreeWalker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ JS::ThrowCompletionOr<JS::GCPtr<Node>> TreeWalker::next_node()
187187
node = *node->first_child();
188188

189189
// 2. Set result to the result of filtering node within this.
190-
auto result = TRY(filter(*node));
190+
result = TRY(filter(*node));
191191

192192
// 3. If result is FILTER_ACCEPT, then set this’s current to node and return node.
193193
if (result == NodeFilter::FILTER_ACCEPT) {

0 commit comments

Comments
 (0)