git ssb

0+

mixmix / patch-suggest



Commit 43f3765c702a25773717997c0eb377f228deca32

early return!

mix irving committed on 9/20/2017, 5:58:09 AM
Parent: 4edb6b6bff53475c9709f189f23c7eaf7c1674dd

Files changed

channel/async/suggest.jschanged
channel/async/suggest.jsView
@@ -15,19 +15,19 @@
1515 var suggestions = null
1616 var subscribed = null
1717
1818 return nest('channel.async.suggest', suggestedChannels)
19-
19 +
2020 function suggestedChannels () {
2121 loadSuggestions()
2222 return function (word) {
2323 if (!word) {
2424 return suggestions().slice(0, 100)
25- } else {
26- word = word.toLowerCase()
27- return suggestions()
28- .filter(item => ~item.title.toLowerCase().indexOf(word))
2925 }
26 +
27 + word = word.toLowerCase()
28 + return suggestions()
29 + .filter(item => ~item.title.toLowerCase().indexOf(word))
3030 }
3131 }
3232
3333 function loadSuggestions () {

Built with git-ssb-web