Skip to content

Commit

Permalink
fix: error when value is null
Browse files Browse the repository at this point in the history
Add fallback for MentionInput's 'value'.

Resolves #36
  • Loading branch information
dabakovich committed Feb 25, 2021
1 parent 313e860 commit 6d5f02c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ const getMentionValue = (trigger: string, suggestion: Suggestion) => `${trigger}
* @param positionOffset - offset from the very beginning of plain text
*/
const parseValue = (
value: string,
value: string = '',
partTypes: PartType[],
positionOffset = 0,
): { plainText: string; parts: Part[] } => {
Expand Down

0 comments on commit 6d5f02c

Please sign in to comment.