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 49bf6ca commit 1af16cdCopy full SHA for 1af16cd
src/librustdoc/html/static/js/search.js
@@ -2489,9 +2489,13 @@ class DocSearch {
2489
}
2490
} catch (err) {
2491
query = newParsedQuery(userQuery);
2492
- // is string list
2493
- // @ts-expect-error
2494
- query.error = err;
+ if (Array.isArray(err) && err.every((elem) => typeof elem == 'string')) {
+ query.error = err;
+ } else {
2495
+ // rethrow the error if it isn't a string array
2496
+ throw err;
2497
+ }
2498
+
2499
return query;
2500
2501
if (!query.literalSearch) {
0 commit comments