(fix): fix regression in find-ref (#650)

Fixes #649.
This commit is contained in:
Leo Vivier 2020-05-17 00:09:58 +02:00 committed by GitHub
parent 265182a698
commit 1bc1559743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -550,7 +550,8 @@ If DESCRIPTION is provided, use this as the link label. See
(title-with-tags (org-roam-completion--completing-read "File: " completions
:initial-input region-text))
(res (cdr (assoc title-with-tags completions)))
(title (plist-get res :title))
(title (or (plist-get res :title)
title-with-tags))
(target-file-path (plist-get res :path))
(description (or description region-text title))
(link-description (org-roam--format-link-title (if lowercase