LibWeb: Don't warn when 'scopes' is present in import maps

Another mistake I made when implementing import map support.
This commit is contained in:
Jamie Mansfield 2024-06-01 10:27:47 +01:00 committed by Tim Flynn
parent 76eb7568c9
commit e13b9bef5c
Notes: sideshowbarker 2024-07-17 05:03:11 +09:00

View File

@ -60,7 +60,7 @@ WebIDL::ExceptionOr<ImportMap> 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();