Skip to content

Commit

Permalink
Fix invalid JS file generation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 16, 2018
1 parent b998995 commit fa9c823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/html/render.rs
Expand Up @@ -868,10 +868,10 @@ themePicker.onblur = handleThemeButtonsBlur;
}

{
let mut data = static_files::STORAGE_JS.to_owned();
data.push_str(&format!("var resourcesSuffix = \"{}\";", cx.shared.resource_suffix));
write_minify(cx.dst.join(&format!("storage{}.js", cx.shared.resource_suffix)),
&data,
&format!("var resourcesSuffix = \"{}\";{}",
cx.shared.resource_suffix,
static_files::STORAGE_JS),
options.enable_minification)?;
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/storage.js
Expand Up @@ -111,7 +111,7 @@ function switchTheme(styleElem, mainStyleElem, newTheme) {

var found = false;
if (savedHref.length === 0) {
onEach(document.getElementsByTagName("link"), function(el) {
onEachLazy(document.getElementsByTagName("link"), function(el) {
savedHref.push(el.href);
});
}
Expand Down

0 comments on commit fa9c823

Please sign in to comment.