diff --git a/editor.html b/editor.html
index 78aa3158..9f22f6b0 100644
--- a/editor.html
+++ b/editor.html
@@ -1245,6 +1245,14 @@
Telegram Limits Editor
this.localization[newId] = this.localization[oldId];
delete this.localization[oldId];
+ const newLocalization = {};
+
+ for (const section of this.structure) {
+ newLocalization[section.id] = this.localization[section.id];
+ }
+
+ this.localization = newLocalization;
+
this.markDirty();
this.constructContent();
});
@@ -1705,6 +1713,14 @@ Telegram Limits Editor
sectionLocale.items[newId] = sectionLocale.items[oldId];
delete sectionLocale.items[oldId];
+ const newItems = {};
+
+ for (const item of section.items) {
+ newItems[item.id] = sectionLocale.items[item.id];
+ }
+
+ sectionLocale.items = newItems;
+
this.markDirty();
this.constructContent();
});