From 0da6f6e3c7737a8d22279b0b739ad3e9bf4c5baa Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 19 Aug 2017 22:46:11 -0400 Subject: [PATCH] Fix Navbar Search after new DB Schema (#60) Fix Navbar Search after new DB Schema --- src/UI/Navbar/Search.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UI/Navbar/Search.js b/src/UI/Navbar/Search.js index 8f8bce656..dfc2ae8fb 100644 --- a/src/UI/Navbar/Search.js +++ b/src/UI/Navbar/Search.js @@ -13,7 +13,7 @@ var substringMatcher = function() { return function findMatches (q, cb) { var matches = _.select(ArtistCollection.toJSON(), function(artist) { - return artist.artistName.toLowerCase().indexOf(q.toLowerCase()) > -1; + return artist.name.toLowerCase().indexOf(q.toLowerCase()) > -1; }); cb(matches); }; @@ -26,13 +26,13 @@ $.fn.bindSearch = function() { minLength : 1 }, { name : 'artist', - displayKey : 'artistName', + displayKey : 'name', source : substringMatcher() }); $(this).on('typeahead:selected typeahead:autocompleted', function(e, artist) { this.blur(); $(this).val(''); - Backbone.history.navigate('/artist/{0}'.format(artist.artistSlug), { trigger : true }); + Backbone.history.navigate('/artist/{0}'.format(artist.nameSlug), { trigger : true }); }); }; \ No newline at end of file