about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-13 14:44:26 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-13 14:44:26 +0200
commitcd79c7189db7b611f9199fd12ba56563afa18642 (patch)
tree60ccced8f0b771c3b0dcd7a19fa3434d4d011486
parenta6620a45bd29575cce67b6a0ab2956aef105e324 (diff)
downloadrust-cd79c7189db7b611f9199fd12ba56563afa18642.tar.gz
rust-cd79c7189db7b611f9199fd12ba56563afa18642.zip
Correctly handle when there are no unstable items in the documented crate
-rw-r--r--src/librustdoc/html/static/js/search.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index 10e01b4e262..0011544d16e 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -2060,7 +2060,9 @@ class DocSearch {
             // Deprecated and unstable items and items with no description
             this.searchIndexDeprecated.set(crate, new RoaringBitmap(crateCorpus.c));
             this.searchIndexEmptyDesc.set(crate, new RoaringBitmap(crateCorpus.e));
-            this.searchIndexUnstable.set(crate, new RoaringBitmap(crateCorpus.u));
+            if (crateCorpus.u !== undefined && crateCorpus.u !== null) {
+                this.searchIndexUnstable.set(crate, new RoaringBitmap(crateCorpus.u));
+            }
             let descIndex = 0;
 
             /**