mirror of
https://github.com/taskgenius/taskgenius-plugin.git
synced 2026-07-22 06:40:25 +00:00
fix(type): type issue with TFile
This commit is contained in:
parent
221fc087ab
commit
ff488e8890
1 changed files with 1 additions and 1 deletions
|
|
@ -596,7 +596,7 @@ export abstract class BaseTaskBasesView extends Component implements BasesView {
|
|||
}
|
||||
|
||||
const tFile = this.app.vault.getAbstractFileByPath(file.path);
|
||||
if (tFile && 'extension' in tFile) {
|
||||
if (tFile instanceof TFile) {
|
||||
const content = await this.app.vault.read(tFile);
|
||||
const updatedContent = content.replace(/^#\s+.*/m, `# ${newContent}`);
|
||||
await this.app.vault.modify(tFile, updatedContent);
|
||||
|
|
|
|||
Loading…
Reference in a new issue