diff --git a/org-roam.el b/org-roam.el index eac7b37..cc2d573 100644 --- a/org-roam.el +++ b/org-roam.el @@ -623,8 +623,9 @@ If FILE-PATH is nil, use the current file." (let (result) ;; We need to handle the special case of the file property drawer (at outline level 0) (org-with-point-at (point-min) - (when-let ((id (org-entry-get nil "ID"))) - (push (vector id file-path (org-outline-level)) result))) + (when-let ((before-first-heading (= 0 (org-outline-level))) + (id (org-entry-get nil "ID"))) + (push (vector id file-path 0) result))) (org-map-region (lambda () (when-let ((id (org-entry-get nil "ID")))