(fix) parsing of missing props (#1406)

Followup from #1404
This commit is contained in:
Boris Buliga
2021-01-26 08:45:19 +02:00
committed by GitHub
parent 96b0a52273
commit fde40dc1c4

View File

@ -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
@ -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