mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 02:35:58 +08:00
style: add no-misused-promises rule (#3547)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
@@ -181,7 +181,9 @@ function NotificationCard(props: NotificationCardProps): ReactElement {
|
||||
|
||||
const onClickUndo = useCallback(() => {
|
||||
if (notification.undo) {
|
||||
return notification.undo();
|
||||
notification.undo().catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
return void 0;
|
||||
}, [notification]);
|
||||
|
||||
Reference in New Issue
Block a user