diff options
author | 2023-10-21 17:23:05 +0200 | |
---|---|---|
committer | 2023-10-21 17:23:05 +0200 | |
commit | 9114c5ca1bff8ebbe3d2d20d873f8f5b7a78be43 (patch) | |
tree | e1afdb23900f6141c5befbb5b21905a240c60482 /web/source/settings/admin/emoji/remote/parse-from-toot.js | |
parent | [docs] Update README.md (#2279) (diff) | |
download | gotosocial-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.js | 11 |
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); } } } |