diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
index 3ab834a5b3..e934642fe9 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
@@ -182,7 +182,7 @@ NonnullRefPtr HTMLFormElement::elements() const
{
// FIXME: This should return the same HTMLFormControlsCollection object every time,
// but that would cause a reference cycle since HTMLCollection refs the root.
- return DOM::HTMLCollection::create(const_cast(*this), [this](Element const& element) {
+ return DOM::HTMLCollection::create(const_cast(*this), [](Element const& element) {
return is_form_control(element);
});
}