mirror of
https://github.com/SerenityOS/serenity
synced 2024-11-05 17:46:52 +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
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