fix unable to set category on new emoji

This commit is contained in:
f0x 2022-11-25 15:19:55 +00:00
parent 90401b1875
commit dcefa14970

View file

@ -81,7 +81,7 @@ function EmojiDetail({emoji}) {
}
React.useEffect(() => {
if (category != emoji.category && !categoryState.open && !isNewCategory && emoji.category != undefined) {
if (category != emoji.category && !categoryState.open && !isNewCategory && category.trim().length > 0) {
console.log("updating to", category);
modifyEmoji({id: emoji.id, category: category.trim()});
}