Skip to content

Commit

Permalink
Fix null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim committed Sep 14, 2024
1 parent 4e43db2 commit bec580f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed an edge case with collecting backlinks.
- Fixed typo in `ObsidianPasteImg`'s command description
- Fixed the case when `opts.attachments` is `nil`.
- Fixed frontmatter not updating when inserting template

## [v3.9.0](https://github.com/epwalsh/obsidian.nvim/releases/tag/v3.9.0) - 2024-07-11

Expand Down
2 changes: 1 addition & 1 deletion lua/obsidian/templates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ local merge_frontmatter = function(line_iterator, note, buf, opts)
frontmatter[#frontmatter + 1] = "---"
local template_as_note = Note.from_lines(iter(frontmatter), note.path, opts)
note:frontmatter_lines()
if note.metadata == null then
if not note.metadata then
note.metadata = {}
end
for key in iter(template_as_note.metadata) do
Expand Down

0 comments on commit bec580f

Please sign in to comment.