Merge pull request #434 from CGQAQ/patch-1

fix(desktop): makes release build working
This commit is contained in:
Jon Kelley 2022-06-10 11:43:57 -04:00 committed by GitHub
commit 8349e252b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,7 +212,12 @@ pub(super) fn handler(
log::warn!("Open print modal failed: {e}");
}
}
DevTool => webview.open_devtools(),
DevTool => {
#[cfg(debug_assertions)]
webview.open_devtools();
#[cfg(not(debug_assertions))]
log::warn!("Devtools are disabled in release builds");
}
Eval(code) => {
if let Err(e) = webview.evaluate_script(code.as_str()) {