Skip to content

Commit

Permalink
Merge pull request rust-lang#796 from badboy/dont-trim-external-js-path
Browse files Browse the repository at this point in the history
Don't strip relative path of additional javascript files
  • Loading branch information
Dylan-DPC authored Apr 26, 2019
2 parents e8d872c + b1ffbaf commit 04b61db
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/renderer/html_handlebars/hbs_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,7 @@ fn make_data(
for script in &html.additional_js {
match script.strip_prefix(root) {
Ok(p) => js.push(p.to_str().expect("Could not convert to str")),
Err(_) => js.push(
script
.file_name()
.expect("File has a file name")
.to_str()
.expect("Could not convert to str"),
),
Err(_) => js.push(script.to_str().expect("Could not convert to str")),
}
}
data.insert("additional_js".to_owned(), json!(js));
Expand Down

0 comments on commit 04b61db

Please sign in to comment.