Skip to content

Commit 691e40b

Browse files
log warning in console if duplicate ids are detected.
1 parent 10224e0 commit 691e40b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/idiomorph.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,12 @@ var Idiomorph = (function () {
11821182
for (const id of duplicateIds) {
11831183
persistentIds.delete(id);
11841184
}
1185+
if (duplicateIds.size) {
1186+
console.warn(
1187+
"[Warning] duplicate ids found during morph, state loss within these elements is possible:",
1188+
Array.from(duplicateIds),
1189+
);
1190+
}
11851191
return persistentIds;
11861192
}
11871193

0 commit comments

Comments
 (0)