Browse Source

"cannot find type `MenuHash` in this scope" (#2240)

Jonathan Dizdarevic 4 years ago
parent
commit
226414d1a5
2 changed files with 6 additions and 1 deletions
  1. 5 0
      .changes/menuhash-fix.md
  2. 1 1
      core/tauri-runtime-wry/src/menu.rs

+ 5 - 0
.changes/menuhash-fix.md

@@ -0,0 +1,5 @@
+---
+"tauri-runtime-wry": patch
+---
+
+Fix the error "cannot find type MenuHash in this scope"

+ 1 - 1
core/tauri-runtime-wry/src/menu.rs

@@ -31,7 +31,7 @@ pub use wry::application::platform::macos::{
 #[cfg(feature = "system-tray")]
 use crate::{Error, Message, Result, TrayMessage};
 
-#[cfg(feature = "menu")]
+#[cfg(any(feature = "menu", feature = "system-tray"))]
 use tauri_runtime::menu::MenuHash;
 
 use uuid::Uuid;