X-Git-Url: https://git.r.bdr.sh/rbdr/nota.nvim/blobdiff_plain/2cc29448a37001cf90b22d089ab992e93afdd71f..9e9e89d8556ecafa6b11ab21aa9ffab550f7f3ad:/lua/notes.lua diff --git a/lua/notes.lua b/lua/notes.lua index f5a4b00..b23d6df 100644 --- a/lua/notes.lua +++ b/lua/notes.lua @@ -37,7 +37,9 @@ end --- Opens the daily note function Notes.open_daily(date) - date = date or os.date('%Y-%m-%d') + if not date or date == '' then + date = os.date('%Y-%m-%d') + end local filename = date .. '.md' open_periodic_note('daily', filename) end