mirror of https://github.com/tauri-apps/tauri
fix listen_global not listening to events with a window label (#2272)
This commit is contained in:
parent
31685c9f9d
commit
a8c1de5547
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes `app.listen_global` not receiving events emitted in javascript.
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue