Skip to content

Update API Support for Obsidian Version 1.4.5  #101

@shubymao

Description

@shubymao

The update API for updating the metadata no longer work as intended after updating to obsidian version 1.4.5 (latest version as of Sept 4, 2023).

For example, I have the following templater code to simply toggle a front matter called outdoor between 1 and 0. When I perform the action, the result behavior causes shift in value of other frontmatter field along with it.

const newOutdoorState = tp.frontmatter["outdoor"] == 0 ? 1 : 0;
await update("outdoor", newOutdoorState, tp.file.path(true))

before

---
outdoor: 0
reading: 0
---

What happen after running the template

---
outdoor: 1
reading: 1
---

What I expect should happen after running the template

---
outdoor: 1
reading: 0
---

Let me know if you need more context about the issue.
Thank you again for providing this plugin. It was very useful to me. Hopefully we can get this resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions