From 47d6b568fdda8a8aceaf13fecd4a3a9123dcd894 Mon Sep 17 00:00:00 2001 From: stelar7 Date: Fri, 25 Apr 2025 18:19:05 +0200 Subject: [PATCH] LibWeb/IDB: Dont keep trailing separator when splitting key paths --- Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp b/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp index 5b2212c86ec..172e459d5f1 100644 --- a/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp +++ b/Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp @@ -917,7 +917,7 @@ WebIDL::ExceptionOr> evaluate_key_path_on_a_value(JS::Realm& // 3. Let identifiers be the result of strictly splitting keyPath on U+002E FULL STOP characters (.). // 4. For each identifier of identifiers, jump to the appropriate step below: - TRY(key_path_string.bytes_as_string_view().for_each_split_view('.', SplitBehavior::KeepEmpty | SplitBehavior::KeepTrailingSeparator, [&](auto const& identifier) -> ErrorOr { + TRY(key_path_string.bytes_as_string_view().for_each_split_view('.', SplitBehavior::KeepEmpty, [&](auto const& identifier) -> ErrorOr { // If Type(value) is String, and identifier is "length" if (value.is_string() && identifier == "length") { // Let value be a Number equal to the number of elements in value.