The `window.config.mentionValues` might be undefined:
```
{{if or .Participants .Assignees .MentionableTeams}}
mentionValues: ...
{{end}}
```
if (mentions) {
collections.push({
- values: window.config.mentionValues,
+ values: window.config.mentionValues ?? [],
requireLeadingSpace: true,
menuItemTemplate: (item) => {
return `
// 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);