fix(frontend): 特定の条件下でノートがnyaizeされない問題を修正

Fix #12331
This commit is contained in:
syuilo 2023-11-15 11:09:54 +09:00
parent d790d658ad
commit 3939360e55
8 changed files with 14 additions and 13 deletions

View file

@ -36,7 +36,7 @@ type MfmProps = {
isNote?: boolean;
emojiUrls?: string[];
rootScale?: number;
nyaize: boolean | 'account';
nyaize: boolean | 'respect';
parsedNodes?: mfm.MfmNode[] | null;
enableEmojiMenu?: boolean;
enableEmojiMenuReaction?: boolean;
@ -45,7 +45,7 @@ type MfmProps = {
// eslint-disable-next-line import/no-default-export
export default function(props: MfmProps) {
const isNote = props.isNote ?? true;
const shouldNyaize = props.nyaize ? props.nyaize === 'account' ? props.author?.isCat : false : false;
const shouldNyaize = props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat : false : false;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (props.text == null || props.text === '') return;