Skip to content

Commit a8c1de5

Browse files
authored
fix listen_global not listening to events with a window label (#2272)
1 parent 31685c9 commit a8c1de5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes `app.listen_global` not receiving events emitted in javascript.

core/tauri/src/event.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl Listeners {
194194
Ok(lock) => {
195195
if let Some(handlers) = lock.get(event) {
196196
for (&id, handler) in handlers {
197-
if window.is_none() || window == handler.window {
197+
if handler.window.is_none() || window == handler.window {
198198
maybe_pending = true;
199199
(handler.callback)(self::Event {
200200
id,

0 commit comments

Comments
 (0)