donteatfriedrice
2024-07-25 07:26:39 +00:00
parent 2b42f84815
commit dd6901fe15
23 changed files with 156 additions and 166 deletions
@@ -24,7 +24,7 @@ import { useNavigateHelper } from './use-navigate-helper';
function hasLinkPopover(editor: AffineEditorContainer | null) {
const textSelection = editor?.host?.std.selection.find('text');
if (editor && textSelection && textSelection.from.length > 0) {
const formatBar = editor.host.querySelector('affine-format-bar-widget');
const formatBar = editor.host?.querySelector('affine-format-bar-widget');
if (formatBar) {
return true;
}