Commit 5fafe2f9 authored by Nikolai R Kristiansen's avatar Nikolai R Kristiansen

馃悰 users can be empty

parent 1502dda7
......@@ -168,7 +168,7 @@ function setSelectedUser(user, updateSearchResult) {
const staleSearchResult = _dom.results.find('.search-result').removeClass('selected');
staleSearchResult.find('input').prop('checked', false);
/* User is still in search result, mark selected */
if (user && users.find(({ id }) => id === user.id)) {
if (user && users && users.find(({ id }) => id === user.id)) {
const searchResult = _dom.results.find(`[data-user-id="${user.id}"]`).toggleClass('selected');
searchResult.find('input').prop('checked', true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment