mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat: add new rule for floating promise (#2726)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -26,9 +26,13 @@ function rpcToObservable<
|
||||
subscriber.complete();
|
||||
return () => {};
|
||||
}
|
||||
handler?.().then(t => {
|
||||
subscriber.next(t);
|
||||
});
|
||||
handler?.()
|
||||
.then(t => {
|
||||
subscriber.next(t);
|
||||
})
|
||||
.catch(err => {
|
||||
subscriber.error(err);
|
||||
});
|
||||
return event(t => {
|
||||
subscriber.next(t);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user