Avoiding accessing undefined mentionValues (#26461)

The `window.config.mentionValues` might be undefined: 

```
{{if or .Participants .Assignees .MentionableTeams}}
    mentionValues: ...
{{end}}
```
This commit is contained in:
wxiaoguang authored and GitHub committed 2023-08-12 08:36:23 +00:00
1 parent 2fc0eb913c
commit 74930b1ccd
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ function makeCollections({mentions, emoji}) {
if (mentions) {
collections.push({
values: window.config.mentionValues,
values: window.config.mentionValues ?? [],
requireLeadingSpace: true,
menuItemTemplate: (item) => {
return `