Skip to content

Commit

Permalink
don't expect on uri
Browse files Browse the repository at this point in the history
  • Loading branch information
r58Playz committed Nov 5, 2024
1 parent 8844634 commit 33744b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rewriter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn get_flag(scramjet: &Object, url: &str, flag: &str) -> Result<bool> {
let ret = fenabled.call2(
&JsValue::NULL,
&flag.into(),
&web_sys::Url::new(url).expect("invalid url").into(),
&web_sys::Url::new(url)?.into(),
)?;

ret.as_bool().ok_or_else(|| RewriterError::not_bool(&ret))
Expand Down

0 comments on commit 33744b4

Please sign in to comment.