Update packages/svelte/src/internal/client/dom/blocks/each.js

Co-authored-by: Rich Harris <rich.harris@vercel.com>
fix-15339
7nik 6 days ago committed by GitHub
parent 8fdb47d050
commit 93354e021a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -477,17 +477,7 @@ function reconcile(
// full key uniqueness check is dev-only, // full key uniqueness check is dev-only,
// key duplicates cause crushing only due to `matched` being empty // key duplicates cause crushing only due to `matched` being empty
if (matched.length === 0) { if (matched.length === 0) {
var map = new Map(); each_key_duplicate('', '', '');
for (j = 0; j < length; j += 1) {
var k = get_key(array[j], j);
if (map.has(k)) {
/** @type {string|null} */
var key_name = String(k);
if (key_name.startsWith('[object ')) key_name = null;
each_key_duplicate(String(j), String(map.get(k)), key_name);
}
map.set(k, j);
}
} }
prev = start.prev; prev = start.prev;

Loading…
Cancel
Save