Skip to content

Commit

Permalink
fix listen_global not listening to events with a window label (#2272)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars committed Jul 23, 2021
1 parent 31685c9 commit a8c1de5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-listen_global-not-getting-events.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Fixes `app.listen_global` not receiving events emitted in javascript.
2 changes: 1 addition & 1 deletion core/tauri/src/event.rs
Expand Up @@ -194,7 +194,7 @@ impl Listeners {
Ok(lock) => {
if let Some(handlers) = lock.get(event) {
for (&id, handler) in handlers {
if window.is_none() || window == handler.window {
if handler.window.is_none() || window == handler.window {
maybe_pending = true;
(handler.callback)(self::Event {
id,
Expand Down

0 comments on commit a8c1de5

Please sign in to comment.