this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't add space if empty string

+5 -3
+5 -3
src/components/compose.jsx
··· 1398 1398 const { selectionStart, selectionEnd } = textarea; 1399 1399 const text = textarea.value; 1400 1400 const textBeforeEmoji = text.slice(0, selectionStart); 1401 - const spaceBeforeEmoji = /[\s\t\n\r]$/.test(textBeforeEmoji) 1402 - ? '' 1403 - : ' '; 1401 + const spaceBeforeEmoji = textBeforeEmoji 1402 + ? /[\s\t\n\r]$/.test(textBeforeEmoji) 1403 + ? '' 1404 + : ' ' 1405 + : ''; 1404 1406 const textAfterEmoji = text.slice(selectionEnd); 1405 1407 const spaceAfterEmoji = /^[\s\t\n\r]/.test(textAfterEmoji) 1406 1408 ? ''