Skip to content

Commit

Permalink
fix: type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Quorafind committed Apr 17, 2024
1 parent 9911858 commit f1fc7c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/canvasMindMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ export default class CanvasMindMap extends Plugin {

console.log(editorInfo);
if (!editorInfo) return false;
if (editorInfo.containerEl && editorInfo.containerEl.closest('.common-editor-inputer')) return false;
if (!editorInfo || !editorInfo.containerEl || editorInfo.containerEl.closest('.common-editor-inputer')) return false;

const patchEditorInfo = editorInfo.constructor;

Expand All @@ -622,7 +622,7 @@ export default class CanvasMindMap extends Plugin {

this.app.workspace.onLayoutReady(() => {
if (!patchEditor()) {
const evt = app.workspace.on("file-open", () => {
const evt = app.workspace.on("active-leaf-change", () => {
setTimeout(() => {
patchEditor() && app.workspace.offref(evt);
}, 100);
Expand Down

0 comments on commit f1fc7c1

Please sign in to comment.