From 5d25c4552d0031ceef032fd58932b6947d74cdf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ktu=C4=9F=20Karaka=C5=9Fl=C4=B1?= <20567087+goktug97@users.noreply.github.com> Date: Fri, 5 Jun 2020 08:36:13 +0300 Subject: [PATCH] (internal): change `org-roam-db--update-tags` to only add non-nil tags (#759) --- org-roam-db.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org-roam-db.el b/org-roam-db.el index 471e4fe..4910103 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -332,8 +332,8 @@ connections, nil is returned." (defun org-roam-db--update-tags () "Update the tags of the current buffer into the cache." - (let* ((file (file-truename (buffer-file-name))) - (tags (org-roam--extract-tags))) + (when-let ((file (file-truename (buffer-file-name))) + (tags (org-roam--extract-tags))) (org-roam-db-query [:delete :from tags :where (= file $s1)] file)