summaryrefslogtreecommitdiff
path: root/themes/PaperMod/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/PaperMod/assets/js')
-rw-r--r--themes/PaperMod/assets/js/fastsearch.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/themes/PaperMod/assets/js/fastsearch.js b/themes/PaperMod/assets/js/fastsearch.js
index 06ebcfb..9484e75 100644
--- a/themes/PaperMod/assets/js/fastsearch.js
+++ b/themes/PaperMod/assets/js/fastsearch.js
@@ -77,7 +77,12 @@ sInput.onkeyup = function (e) {
// run a search query (for "term") every time a letter is typed
// in the search box
if (fuse) {
- const results = fuse.search(this.value.trim()); // the actual query being run using fuse.js
+ let results;
+ if (params.fuseOpts) {
+ results = fuse.search(this.value.trim(), {limit: params.fuseOpts.limit}); // the actual query being run using fuse.js along with options
+ } else {
+ results = fuse.search(this.value.trim()); // the actual query being run using fuse.js
+ }
if (results.length !== 0) {
// build our html if result exists
let resultSet = ''; // our results bucket