Open AndyEveritt opened 2 months ago
https://docs.obsidian.md/Reference/TypeScript+API/FileManager/processFrontMatter
[!NOTE] I am not a JS/TS developer so my terminology is likely wrong
Steps to reproduce:
await this.app.fileManager.processFrontMatter( sharedFile.file, (frontmatter) => { // Remove the shared link delete frontmatter["link"]; }
taken from project
if link is the only field in the frontmatter object then this will not do anything. If there are other fields then the link field is correctly deleted
link
The provided code would delete the link field from the frontmatter regardless of is it leaves the frontmatter empty
https://docs.obsidian.md/Reference/TypeScript+API/FileManager/processFrontMatter
Steps to reproduce:
if
link
is the only field in the frontmatter object then this will not do anything. If there are other fields then thelink
field is correctly deletedExpected Behaviour
The provided code would delete the
link
field from the frontmatter regardless of is it leaves the frontmatter empty