mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
fix: replace noop function (#2744)
(cherry picked from commit af6f431c15)
This commit is contained in:
@@ -24,7 +24,7 @@ function rpcToObservable<
|
||||
onSubscribe?.();
|
||||
if (typeof window === 'undefined' || !env.isDesktop || !event) {
|
||||
subscriber.complete();
|
||||
return () => {};
|
||||
return;
|
||||
}
|
||||
handler?.()
|
||||
.then(t => {
|
||||
|
||||
@@ -30,7 +30,7 @@ function useMouseOffset() {
|
||||
el.removeEventListener('mouseleave', onMouseLeave);
|
||||
};
|
||||
}
|
||||
return () => {};
|
||||
return;
|
||||
}, []);
|
||||
|
||||
return [offset, outside, ref] as const;
|
||||
|
||||
@@ -80,7 +80,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
|
||||
.forEach(dispose => dispose());
|
||||
};
|
||||
}
|
||||
return () => {};
|
||||
return;
|
||||
}, [editor, editor.page, page, onLoad]);
|
||||
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -13,5 +13,5 @@ previewBlockIdAtom.onMount = set => {
|
||||
window.removeEventListener('affine.embed-block-db-click', callback);
|
||||
};
|
||||
}
|
||||
return () => {};
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -201,7 +201,7 @@ function NotificationCard(props: NotificationCardProps): ReactElement {
|
||||
h.filter(height => height.notificationKey !== notification.key)
|
||||
);
|
||||
}
|
||||
return () => {};
|
||||
return;
|
||||
}, [notification.key, setHeights]);
|
||||
return (
|
||||
<Toast.Root
|
||||
|
||||
Reference in New Issue
Block a user