1
Fork 0

Rollup merge of #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
This commit is contained in:
Mazdak Farrokhzad 2019-01-15 12:42:14 +01:00 committed by GitHub
commit 9947b3060c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2431,7 +2431,7 @@ if (!DOMTokenList.prototype.remove) {
return;
}
var crates_text = [];
if (crates.length > 1) {
if (Object.keys(crates).length > 1) {
for (var crate in crates) {
if (crates.hasOwnProperty(crate)) {
crates_text.push(crate);