mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-27 00:23:41 +09:00
Avoiding accessing undefined mentionValues (#26461)
The `window.config.mentionValues` might be undefined:
```
{{if or .Participants .Assignees .MentionableTeams}}
mentionValues: ...
{{end}}
```
This commit is contained in:
@@ -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 `
|
||||
|
||||
Reference in New Issue
Block a user