Skip to content

Commit

Permalink
(fix) parsing of missing props (org-roam#1406)
Browse files Browse the repository at this point in the history
Followup from org-roam#1404
  • Loading branch information
d12frosted committed Jan 26, 2021
1 parent 96b0a52 commit fde40dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions org-roam.el
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ If FILE-PATH is nil, use the current file."
"Return the aliases from the current buffer.
Reads from the \"roam_alias\" property."
(let* ((prop (org-roam--extract-global-props '("ROAM_ALIAS")))
(aliases (cdr (assoc "ROAM_ALIAS" prop))))
(aliases (or (cdr (assoc "ROAM_ALIAS" prop))
"")))
(condition-case nil
(split-string-and-unquote aliases)
(error
Expand Down Expand Up @@ -701,7 +702,8 @@ tag."

(defun org-roam--extract-tags-prop (_file)
"Extract tags from the current buffer's \"#roam_tags\" global property."
(let* ((prop (cdr (assoc "ROAM_TAGS" (org-roam--extract-global-props '("ROAM_TAGS"))))))
(let* ((prop (or (cdr (assoc "ROAM_TAGS" (org-roam--extract-global-props '("ROAM_TAGS"))))
"")))
(condition-case nil
(split-string-and-unquote prop)
(error
Expand Down

0 comments on commit fde40dc

Please sign in to comment.