Skip to content

Commit 8860c5a

Browse files
committed
Fix JS to match Rust definition of optional field.
1 parent af6f347 commit 8860c5a

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
@@ -1022,7 +1022,7 @@ function preLoadCss(cssUrl) {
10221022
// same heading are grouped.
10231023
const cratesGroupedByHeading = new Map();
10241024
for (const entry of window.ALL_CRATES) {
1025-
const heading = entry.h;
1025+
const heading = entry.h || "";
10261026
const crateName = entry.c;
10271027
let group = cratesGroupedByHeading.get(heading);
10281028
if (group === undefined) {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ declare namespace rustdoc {
357357
*
358358
* May be empty to specify the first, primary heading.
359359
*/
360-
h: string,
360+
h?: string,
361361
/** Crate name. */
362362
c: string,
363363
}

0 commit comments

Comments
 (0)