fix: add eval script failed log

This commit is contained in:
YuKun Liu committed 2022-05-11 14:09:31 +08:00
1 parent 5ad484f4bf
commit b7e9dca87c
1 file changed
+5 -3
+5 -3
View File
@@ -193,9 +193,11 @@ pub(super) fn handler(
DevTool => {}
Eval(code) => webview
.evaluate_script(code.as_str())
.expect("eval shouldn't panic"),
Eval(code) => {
if let Err(e) = webview.evaluate_script(code.as_str()) {
log::error!("Eval script error: {e}");
}
}
}
}