diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ImportMap.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/ImportMap.cpp
index 34d0fd5f4dd..52caff18b51 100644
--- a/Userland/Libraries/LibWeb/HTML/Scripting/ImportMap.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Scripting/ImportMap.cpp
@@ -60,7 +60,7 @@ WebIDL::ExceptionOr parse_import_map_string(JS::Realm& realm, ByteStr
// 7. If parsed's keys contains any items besides "imports" or "scopes", then the user agent should report a warning to the console indicating that an invalid top-level key was present in the import map.
for (auto& key : parsed_object.shape().property_table().keys()) {
- if (key.as_string() == "imports" || key.as_string() == "imports")
+ if (key.as_string().is_one_of("imports", "scopes"))
continue;
auto& console = realm.intrinsics().console_object()->console();