Skip to content

Commit

Permalink
Unrolled build for rust-lang#118986
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#118986 - GuillaumeGomez:simplify-js-inline, r=notriddle

Simplify JS code a little bit

As mentioned, JS code can be simplified a little bit.

r? ``@notriddle``
  • Loading branch information
rust-timer authored Dec 15, 2023
2 parents 3f39cae + 028a313 commit 30b613d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/write_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ pub(super) fn write_shared(
v.push_str(
r#"\
]'));
if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
if (typeof exports !== 'undefined') exports.searchIndex = searchIndex;
else if (window.initSearch) window.initSearch(searchIndex);
"#,
);
Ok(v.into_bytes())
Expand Down

0 comments on commit 30b613d

Please sign in to comment.