Before setting the default project, check if the current file exists.

This commit is contained in:
HeroBlackInk 2023-06-11 21:25:52 +08:00
parent e765b8cbae
commit 918136e91b

View file

@ -266,8 +266,11 @@ export default class UltimateTodoistSyncForObsidian extends Plugin {
id: 'set-default-project-for-todoist-task-in-the-current-file',
name: 'Set default project for todoist task in the current file',
editorCallback: (editor: Editor, view: MarkdownView) => {
if(!view){
return
}
const filepath = view.file.path
new SetDefalutProjectInTheFilepathModal(this.app,this,this.cacheOperation,filepath)
new SetDefalutProjectInTheFilepathModal(this.app,this,filepath)
}
});