summaryrefslogtreecommitdiffstatshomepage
path: root/nroam.el
diff options
context:
space:
mode:
authorGravatar Nicolas Petton2021-02-24 09:08:30 +0100
committerGravatar Nicolas Petton2021-02-24 09:08:30 +0100
commit34e21d6880c7c6fe1eed86ecd7cfc303c3338ad5 (patch)
tree34adb8f515133762de87d2d5e9929946d1295797 /nroam.el
parent58d4bcf5f53e6598aa901d8f21c9bb2d9c65191b (diff)
downloadnroam-34e21d6880c7c6fe1eed86ecd7cfc303c3338ad5.tar.gz
nroam-34e21d6880c7c6fe1eed86ecd7cfc303c3338ad5.zip
Do not insert backlink section when there is no backlink
Diffstat (limited to 'nroam.el')
-rw-r--r--nroam.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/nroam.el b/nroam.el
index d30b8e4..ed635ee 100644
--- a/nroam.el
+++ b/nroam.el
@@ -119,8 +119,8 @@ Make the region inserted by BODY read-only, and marked with
(defun nroam-backlinks-section ()
"Insert org-roam backlinks for the current buffer."
- (let* ((backlinks (nroam--get-backlinks))
- (groups (seq-reverse (nroam--group-backlinks backlinks))))
+ (when-let* ((backlinks (nroam--get-backlinks))
+ (groups (seq-reverse (nroam--group-backlinks backlinks))))
(nroam--ensure-empty-line)
(nroam--insert-backlinks-heading (seq-length backlinks))
(seq-do #'nroam--insert-backlink-group groups)