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 c39b706 commit a1254d5Copy full SHA for a1254d5
lib/resources/script.js
@@ -177,12 +177,14 @@ function initSearch(name) {
177
};
178
179
function initTypeahead() {
180
- var search = new URLSearchParams(window.location.search).get('search');
181
- if (search) {
182
- var matches = findMatches(search);
183
- if (matches.length != 0) {
184
- window.location = baseHref + matches[0].href;
185
- return;
+ if ('URLSearchParams' in window) {
+ var search = new URLSearchParams(window.location.search).get('search');
+ if (search) {
+ var matches = findMatches(search);
+ if (matches.length !== 0) {
+ window.location = baseHref + matches[0].href;
186
+ return;
187
+ }
188
}
189
190
0 commit comments