summaryrefslogtreecommitdiff
path: root/web/source/settings/admin/emoji/remote/parse-from-toot.js
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-10-21 17:23:05 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-21 17:23:05 +0200
commit9114c5ca1bff8ebbe3d2d20d873f8f5b7a78be43 (patch)
treee1afdb23900f6141c5befbb5b21905a240c60482 /web/source/settings/admin/emoji/remote/parse-from-toot.js
parent[docs] Update README.md (#2279) (diff)
downloadgotosocial-9114c5ca1bff8ebbe3d2d20d873f8f5b7a78be43.tar.xz
[bugfix/frontend] fix typo and other oddness in patchRemoteEmojis (#2281)v0.12.0
* fix emoji test model * found the bug! * remove unused 'current' import * comment useChecklistReducer * wah * lint * fix cleaner tests
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);
}
}
}