AK: Don't keep equal JsonObject keys in the order vector twice

Fixes #3069.
This commit is contained in:
Linus Groh 2020-08-10 13:49:34 +02:00 committed by Andreas Kling
parent ecc8a42cd2
commit f649009887

View file

@ -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>