Skip to content

Commit 94b4ab5

Browse files
authored
Rollup merge of rust-lang#57614 - GuillaumeGomez:fix-crate-filtering, r=QuietMisdreavus
[rustdoc] Fix crates filtering box not being filled Currently, the filter crate box (at the left of the search input) is always empty. To get the number of keys of dictionary in JS, you need to call `Object.keys()` on it. r? @QuietMisdreavus
2 parents e116891 + 0d695ff commit 94b4ab5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/static/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2431,7 +2431,7 @@ if (!DOMTokenList.prototype.remove) {
24312431
return;
24322432
}
24332433
var crates_text = [];
2434-
if (crates.length > 1) {
2434+
if (Object.keys(crates).length > 1) {
24352435
for (var crate in crates) {
24362436
if (crates.hasOwnProperty(crate)) {
24372437
crates_text.push(crate);

0 commit comments

Comments
 (0)