Skip to content

Commit a238fd1

Browse files
committed
don't use JS features that are too new
1 parent 7b22d58 commit a238fd1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustdoc/html/static/js/search.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,8 +2726,7 @@ class DocSearch {
27262726
// we are doing a return-type based search,
27272727
// deprioritize "clone-like" results,
27282728
// ie. functions that also take the queried type as an argument.
2729-
//console.log(result.item?.type);
2730-
if (containsTypeFromQuery(result.item?.type?.inputs)) {
2729+
if (result.item && result.item.type && containsTypeFromQuery(result.item.type.inputs)) {
27312730
result.path_dist *= 100;
27322731
result.dist *= 100;
27332732
console.log(result);

0 commit comments

Comments
 (0)