Fix invalid JS file generation

This commit is contained in:
Guillaume Gomez 2018-12-16 14:44:44 +01:00
parent b998995813
commit fa9c8232d7
2 changed files with 4 additions and 4 deletions

View File

@ -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)?;
}

View File

@ -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);
});
}