From 9114c5ca1bff8ebbe3d2d20d873f8f5b7a78be43 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:23:05 +0200 Subject: [bugfix/frontend] fix typo and other oddness in patchRemoteEmojis (#2281) * fix emoji test model * found the bug! * remove unused 'current' import * comment useChecklistReducer * wah * lint * fix cleaner tests --- web/source/settings/admin/emoji/remote/parse-from-toot.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'web/source/settings/admin/emoji/remote/parse-from-toot.js') 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); } } } -- cgit v1.2.3