We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d1bd0d commit 028a313Copy full SHA for 028a313
src/librustdoc/html/render/write_shared.rs
@@ -328,8 +328,8 @@ pub(super) fn write_shared(
328
v.push_str(
329
r#"\
330
]'));
331
-if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
332
-if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
+if (typeof exports !== 'undefined') exports.searchIndex = searchIndex;
+else if (window.initSearch) window.initSearch(searchIndex);
333
"#,
334
);
335
Ok(v.into_bytes())
0 commit comments