mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 08:11:24 +02:00
Lint stuff
This commit is contained in:
@@ -22,7 +22,9 @@ export function listen<K extends keyof RpcEventSchema>(
|
||||
): () => void {
|
||||
let unsub: (() => void) | null = null;
|
||||
tauriListen<RpcEventSchema[K]>(event, (e) => callback(e.payload))
|
||||
.then((fn) => (unsub = fn))
|
||||
.then((fn) => {
|
||||
unsub = fn;
|
||||
})
|
||||
.catch(console.error);
|
||||
return () => unsub?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user