Skip to content

Commit cd79c71

Browse files
Correctly handle when there are no unstable items in the documented crate
1 parent a6620a4 commit cd79c71

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)