mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb/IDB: Dont keep trailing separator when splitting key paths
This commit is contained in:
committed by
Jelle Raaijmakers
parent
577f799240
commit
47d6b568fd
Notes:
github-actions[bot]
2025-04-28 09:32:45 +00:00
Author: https://github.com/stelar7 Commit: https://github.com/LadybirdBrowser/ladybird/commit/47d6b568fdd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4476 Reviewed-by: https://github.com/gmta ✅
@@ -917,7 +917,7 @@ WebIDL::ExceptionOr<ErrorOr<JS::Value>> 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<void> {
|
||||
TRY(key_path_string.bytes_as_string_view().for_each_split_view('.', SplitBehavior::KeepEmpty, [&](auto const& identifier) -> ErrorOr<void> {
|
||||
// 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.
|
||||
|
||||
Reference in New Issue
Block a user