Skip to content

Commit

Permalink
fix: fix algolia search modal
Browse files Browse the repository at this point in the history
- close #672
  • Loading branch information
LouisBarranqueiro committed Feb 22, 2021
1 parent 9fa59de commit 4edde63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions source/_js/search-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,9 @@
*/
search: function(search) {
var self = this;
this.algolia.search(search, function(err, content) {
if (!err) {
self.showResults(content.hits);
self.showResultsCount(content.nbHits);
}
this.algolia.search(search).then(function(content) {
self.showResults(content.hits);
self.showResultsCount(content.nbHits);
});
},

Expand Down
2 changes: 1 addition & 1 deletion tasks/config/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = function(grunt) {
dest: jsDestFolder + 'moment-with-locales.js'
},
{
src: './node_modules/algoliasearch/dist/algoliasearch.js',
src: './node_modules/algoliasearch/dist/algoliasearch.umd.js',
dest: jsDestFolder + 'algoliasearch.js'
}
]
Expand Down

0 comments on commit 4edde63

Please sign in to comment.