diff options
Diffstat (limited to 'public/javascripts/main.js')
-rw-r--r-- | public/javascripts/main.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 2dc4fe3..aecf21f 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -114,9 +114,10 @@ searchNode.addEventListener('submit', submitForm) function submitForm (e) { if (e) e.preventDefault() - if (results == null) return - const indexInResult = selectedResult === -1 ? 0 : selectedResult - selectedUser = users[results[indexInResult].index] + if (results != null) { + const indexInResult = selectedResult === -1 ? 0 : selectedResult + selectedUser = users[results[indexInResult].index] + } updateFavNode() @@ -202,11 +203,7 @@ const currentFav = getCurrentFav() if (currentFav) { selectedUser = currentFav - if (selectedUser.other !== '') { - inputNode.value = selectedUser.other - } else { - inputNode.value = selectedUser.value - } + inputNode.value = selectedUser.value scheduleIframe.src = getURLOfUser(offset, selectedUser.type, selectedUser.index + 1) updateFavNode() } |