diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-15 12:42:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-15 12:42:14 +0100 |
| commit | 9947b3060c165ef2677c0e0454991a53ef743224 (patch) | |
| tree | b1f7665bd924ad88138b25bfe5a0601a459f37bc | |
| parent | a52ec3c9eeee89ea2ea6eb5716f5e796a0dc1cfc (diff) | |
| parent | 0d695ff33089c91a68c4be0877a53a216b991f10 (diff) | |
| download | rust-9947b3060c165ef2677c0e0454991a53ef743224.tar.gz rust-9947b3060c165ef2677c0e0454991a53ef743224.zip | |
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
| -rw-r--r-- | src/librustdoc/html/static/main.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 9db1c686090..ceadbd5afac 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -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); |
