diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-09-14 15:08:09 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-09-14 15:08:09 +0200 |
commit | c8c8af7a3aa5200cd1e7ffaf4c9833ddc4a4b783 (patch) | |
tree | e92b37cabeed21365fed2018a3613dc5e7a623b5 /public/javascripts/main.js | |
parent | fa0a8be12c2b290a59d26dc7ba1c8360a3c23486 (diff) |
fixed week changer not working on fav
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() } |