Tweaking filter to be case insensitive

This commit is contained in:
Will Marshall
2014-04-22 16:10:13 +10:00
parent 8b7d2641f9
commit baa2065238

View File

@@ -3,7 +3,7 @@ Darkswarm.filter 'filterHubs', ->
hubs ||= []
text ?= ""
match = (matched)->
matched.indexOf(text) != -1
matched.toLowerCase().indexOf(text.toLowerCase()) != -1
hubs.filter (hub)->
match(hub.name) or match(hub.address.zipcode) or match(hub.address.city)