mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Don't keep equal JsonObject keys in the order vector twice
Fixes #3069.
This commit is contained in:
parent
ecc8a42cd2
commit
f649009887
Notes:
sideshowbarker
2024-07-19 04:04:15 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/f6490098874 Pull-request: https://github.com/SerenityOS/serenity/pull/3070 Issue: https://github.com/SerenityOS/serenity/issues/3069 Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 1 deletions
|
@ -100,8 +100,9 @@ public:
|
|||
|
||||
void set(const String& key, JsonValue value)
|
||||
{
|
||||
if (m_members.set(key, move(value)) == HashSetResult::ReplacedExistingEntry)
|
||||
m_order.remove(m_order.find_first_index(key).value());
|
||||
m_order.append(key);
|
||||
m_members.set(key, move(value));
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
|
|
Loading…
Reference in a new issue