Skip to content

Commit cc4a624

Browse files
authored
Allow empty text in output functor (#212)
1 parent 01e64e9 commit cc4a624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Textarea.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ class ReactTextareaAutocomplete extends React.Component<
530530
};
531531
}
532532

533-
if (!textToReplace.text) {
533+
if (!textToReplace.text && typeof textToReplace.text !== 'string') {
534534
throw new Error(
535535
`Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "${currentTrigger}"\n`
536536
);

0 commit comments

Comments
 (0)