Browse Source

Do not insert backlink section when there is no backlink

master
Nicolas Petton 1 month ago
parent
commit
34e21d6880
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      nroam.el

+ 2
- 2
nroam.el View File

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


Loading…
Cancel
Save