signavio / react-mentions

@mention people in a textarea
https://react-mentions.vercel.app
Other
2.4k stars 560 forks source link

Text Paste Error before typing in textarea #718

Open SirRatul opened 9 months ago

SirRatul commented 9 months ago

Getting an error when trying to paste in the react mention text area before typing anything Uncaught TypeError: Cannot read properties of undefined (reading 'length') at iterateMentionsMarkup (react-mentions.esm.js:111:1) at mapPlainTextIndex (react-mentions.esm.js:166:1) at MentionsInput.handlePaste (react-mentions.esm.js:1958:1) image

hilmanfjrsy commented 8 months ago

in my case this is happened because the default value is undefined, i have tried to change the default value to empty string. it's works