1
0
mirror of https://gitcode.com/gitea/gitea.git synced 2025-06-16 17:59:25 +08:00

Avoiding accessing undefined mentionValues ()

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

```
{{if or .Participants .Assignees .MentionableTeams}}
    mentionValues: ...
{{end}}
```
This commit is contained in:
wxiaoguang
2023-08-12 16:36:23 +08:00
committed by GitHub
parent 2fc0eb913c
commit 74930b1ccd
2 changed files with 2 additions and 2 deletions
web_src/js
features
utils

@ -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 `