Skip to content

Commit 19b4e2e

Browse files
committed
Fix JS to match Rust definition of optional field.
1 parent 5a2e224 commit 19b4e2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustdoc/html/static/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ function preLoadCss(cssUrl) {
10131013
// same heading are grouped.
10141014
const cratesGroupedByHeading = new Map();
10151015
for (const entry of window.ALL_CRATES) {
1016-
const heading = entry.h;
1016+
const heading = entry.h || "";
10171017
const crateName = entry.c;
10181018
let group = cratesGroupedByHeading.get(heading);
10191019
if (group === undefined) {

src/librustdoc/html/static/js/rustdoc.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ declare namespace rustdoc {
403403
*
404404
* May be empty to specify the first, primary heading.
405405
*/
406-
h: string,
406+
h?: string,
407407
/** Crate name. */
408408
c: string,
409409
}

0 commit comments

Comments
 (0)