diff --git a/web_src/js/features/tribute.js b/web_src/js/features/tribute.js index 43fa79b2a4d..055777be79e 100644 --- a/web_src/js/features/tribute.js +++ b/web_src/js/features/tribute.js @@ -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 ` diff --git a/web_src/js/utils/match.js b/web_src/js/utils/match.js index 029fec8840a..17fdfed113e 100644 --- a/web_src/js/utils/match.js +++ b/web_src/js/utils/match.js @@ -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.mentionValues) { + for (const obj of window.config.mentionValues ?? []) { const index = obj.key.toLowerCase().indexOf(query); if (index === -1) continue; const existing = results.get(obj);