aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web_src/js/features/tribute.js2
-rw-r--r--web_src/js/utils/match.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/tribute.js b/web_src/js/features/tribute.js
index 43fa79b2a4..055777be79 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 029fec8840..17fdfed113 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);