mirror of https://github.com/go-gitea/gitea.git
Backport #26461
This commit is contained in:
parent
2bdc38e592
commit
9112ce22a4
|
@ -31,7 +31,7 @@ function makeCollections({mentions, emoji}) {
|
|||
|
||||
if (mentions) {
|
||||
collections.push({
|
||||
values: window.config.tributeValues,
|
||||
values: window.config.tributeValues ?? [],
|
||||
requireLeadingSpace: true,
|
||||
menuItemTemplate: (item) => {
|
||||
return `
|
||||
|
|
|
@ -32,7 +32,7 @@ export function matchMention(queryText) {
|
|||
|
||||
// results is a map of weights, lower is better
|
||||
const results = new Map();
|
||||
for (const obj of window.config.tributeValues) {
|
||||
for (const obj of window.config.tributeValues ?? []) {
|
||||
const index = obj.key.toLowerCase().indexOf(query);
|
||||
if (index === -1) continue;
|
||||
const existing = results.get(obj);
|
||||
|
|
Loading…
Reference in New Issue