From 20763a741ac436273ae3e0ca1ca7be96a911fef2 Mon Sep 17 00:00:00 2001 From: wonfen Date: Tue, 11 Feb 2025 01:50:48 +0800 Subject: [PATCH] fix: app crash without a default global_hotkey vaule --- src-tauri/src/core/hotkey.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/core/hotkey.rs b/src-tauri/src/core/hotkey.rs index a66bd859..bd45d02b 100755 --- a/src-tauri/src/core/hotkey.rs +++ b/src-tauri/src/core/hotkey.rs @@ -84,7 +84,7 @@ impl Hotkey { } } else { if let Some(window) = app_handle.get_webview_window("main") { - let is_enable_global_hotkey = { Config::verge().latest().enable_global_hotkey} .unwrap(); + let is_enable_global_hotkey = Config::verge().latest().enable_global_hotkey.unwrap_or(true); let is_visible = window.is_visible().unwrap_or(false); let is_focused = window.is_focused().unwrap_or(false);