From 5fafe2f9f3a7ef120310390c6fb47ac44305d8d1 Mon Sep 17 00:00:00 2001 From: Nikolai R Kristiansen Date: Sun, 5 Jan 2020 20:08:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20users=20can=20be=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/app/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/index.js b/static/app/index.js index 315e1ae..9f9bbec 100644 --- a/static/app/index.js +++ b/static/app/index.js @@ -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); }