Skip to content

Commit 858927c

Browse files
Rollup merge of #145349 - GuillaumeGomez:unstable-items-search, r=lolbinarycat,fmease
Correctly handle when there are no unstable items in the documented crate Fixes #145287. cc ```@lolbinarycat```
2 parents 6f0746d + cd79c71 commit 858927c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,9 @@ class DocSearch {
20602060
// Deprecated and unstable items and items with no description
20612061
this.searchIndexDeprecated.set(crate, new RoaringBitmap(crateCorpus.c));
20622062
this.searchIndexEmptyDesc.set(crate, new RoaringBitmap(crateCorpus.e));
2063-
this.searchIndexUnstable.set(crate, new RoaringBitmap(crateCorpus.u));
2063+
if (crateCorpus.u !== undefined && crateCorpus.u !== null) {
2064+
this.searchIndexUnstable.set(crate, new RoaringBitmap(crateCorpus.u));
2065+
}
20642066
let descIndex = 0;
20652067

20662068
/**

0 commit comments

Comments
 (0)