(internal): remove error-checking for olp (#1326)

The `org-roam-capture-find-or-create-olp` function will throw the same
error, so we don't have to explicitly catch and throw.
This commit is contained in:
Jethro Kuan
2020-11-24 21:09:28 +08:00
committed by GitHub
parent fb0662efe7
commit 06d0db736a

View File

@ -529,14 +529,7 @@ This function is used solely in Org-roam's capture templates: see
(org-roam-capture--put prop val)))
(set-buffer (org-capture-target-buffer file-path))
(widen)
(if-let* ((olp (--> (org-roam-capture--get :olp)
(pcase it
((pred listp)
it)
(wrong-type
(signal 'wrong-type-argument
`((stringp listp)
,wrong-type)))))))
(if-let* ((olp (org-roam-capture--get :olp)))
(condition-case err
(when-let ((marker (org-roam-capture-find-or-create-olp olp)))
(goto-char marker)