Lint stuff

This commit is contained in:
Gregory Schier
2026-03-08 15:50:13 -07:00
parent 96a22c68f2
commit 6e11894f79
4 changed files with 35 additions and 20 deletions

View File

@@ -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?.();
}