Skip to content

Commit e70f811

Browse files
committed
small fixes
1 parent 98af9b1 commit e70f811

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/obsidian/src/components/ModifyNodeModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export const ModifyNodeForm = ({
8585
string | undefined
8686
>(undefined);
8787
const hasEditorContext =
88-
plugin.app.workspace.activeLeaf?.view instanceof MarkdownView;
88+
!!plugin.app.workspace.getActiveViewOfType(MarkdownView);
89+
console.log("hasEditorContext", hasEditorContext);
8990
const [insertBacklink, setInsertBacklink] = useState(!!initialTitle);
9091
const queryEngine = useRef(new QueryEngine(plugin.app));
9192
const titleInputRef = useRef<HTMLTextAreaElement>(null);

0 commit comments

Comments
 (0)