mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Do not unwrap empty unminified_js_dir in HTMLScriptElement.unminify_js.
This commit is contained in:
parent
dd2deeabca
commit
458795d485
1 changed files with 9 additions and 1 deletions
|
@ -556,7 +556,15 @@ impl HTMLScriptElement {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = PathBuf::from(window_from_node(self).unminified_js_dir().unwrap());
|
let path;
|
||||||
|
match window_from_node(self).unminified_js_dir() {
|
||||||
|
Some(unminified_js_dir) => path = PathBuf::from(unminified_js_dir),
|
||||||
|
None => {
|
||||||
|
warn!("Could not store script directory not found");
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
let path = if script.external {
|
let path = if script.external {
|
||||||
// External script.
|
// External script.
|
||||||
let path_parts = script.url.path_segments().unwrap();
|
let path_parts = script.url.path_segments().unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue