fix: error pattern

This commit is contained in:
YuKun Liu 2022-01-18 14:54:48 +08:00
parent f006f50317
commit 62b637f8b0

View file

@ -196,11 +196,8 @@ pub fn launch_with_props<P: 'static + Send>(
let temp = arr[0].as_object().unwrap();
if temp.contains_key("href") {
let url = temp.get("href").unwrap().as_str().unwrap();
match webbrowser::open(url) {
Ok(_) => {}
Err(e) => {
log::trace!("Open browser error: {:?}", e)
}
if let Err(e) = webbrowser::open(url) {
log::error!("Open Browser error: {:?}", e);
}
}
}