diff --git a/src/Textarea.jsx b/src/Textarea.jsx index 615391d..7826508 100644 --- a/src/Textarea.jsx +++ b/src/Textarea.jsx @@ -530,7 +530,7 @@ class ReactTextareaAutocomplete extends React.Component< }; } - if (!textToReplace.text) { + if (!textToReplace.text && typeof textToReplace.text !== 'string') { throw new Error( `Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "${currentTrigger}"\n` );