summaryrefslogtreecommitdiff
path: root/web/source/settings/admin/emoji/remote/parse-from-toot.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/settings/admin/emoji/remote/parse-from-toot.js')
-rw-r--r--web/source/settings/admin/emoji/remote/parse-from-toot.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/web/source/settings/admin/emoji/remote/parse-from-toot.js b/web/source/settings/admin/emoji/remote/parse-from-toot.js
index 503a341c8..7c29cccfd 100644
--- a/web/source/settings/admin/emoji/remote/parse-from-toot.js
+++ b/web/source/settings/admin/emoji/remote/parse-from-toot.js
@@ -127,11 +127,12 @@ function CopyEmojiForm({ localEmojiCodes, type, emojiList }) {
{
changedOnly: false,
onFinish: ({ data }) => {
- if (data != undefined) {
- form.selectedEmoji.updateMultiple(
- // uncheck all successfully processed emoji
- data.map(([id]) => [id, { checked: false }])
- );
+ if (data) {
+ // uncheck all successfully processed emoji
+ const processed = data.map((emoji) => {
+ return [emoji.id, { checked: false }];
+ });
+ form.selectedEmoji.updateMultiple(processed);
}
}
}