mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-05 00:22:42 +00:00
remove null from emojifiedtext state
This commit is contained in:
parent
6a23cd26fc
commit
1d9a5e4abd
|
@ -32,10 +32,6 @@ export const ModernEmojiHTML = ({
|
|||
deep: !shallow,
|
||||
});
|
||||
|
||||
if (emojifiedHtml === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Wrapper
|
||||
{...props}
|
||||
|
|
|
@ -26,7 +26,7 @@ export function useEmojify({
|
|||
extraEmojis,
|
||||
deep = true,
|
||||
}: UseEmojifyOptions) {
|
||||
const [emojifiedText, setEmojifiedText] = useState<string | null>(null);
|
||||
const [emojifiedText, setEmojifiedText] = useState(text);
|
||||
|
||||
const appState = useEmojiAppState();
|
||||
const extra: ExtraCustomEmojiMap = useMemo(() => {
|
||||
|
@ -55,6 +55,7 @@ export function useEmojify({
|
|||
},
|
||||
[appState, deep, extra],
|
||||
);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (isModernEmojiEnabled() && !!text.trim()) {
|
||||
const result = emojify(text);
|
||||
|
|
Loading…
Reference in New Issue
Block a user