We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12bed64 commit 1c78effCopy full SHA for 1c78eff
docs/js/instantsearch.js
@@ -26,9 +26,10 @@
26
},
27
}
28
29
- const search_query = doc.location.hash.match(/q=(.*?)(&|$)/)[1] ?? '';
+ let match = null;
30
+ const search_query = (match = doc.location.hash.match(/q=(.*?)(&|$)/)) ? match[1] : '';
31
const parsed_search_query = decodeURI(search_query.replace('+', ' '));
- const search_page = doc.location.hash.match(/p=(\d*?)(&|$)/)[1] ?? 1;
32
+ const search_page = (match = doc.location.hash.match(/p=(\d*?)(&|$)/)) ? match[1] : 1;
33
const parsed_search_page = parseInt(search_page);
34
const version = doc.location.pathname.split('/')[2];
35
const search = instantsearch({
0 commit comments