(node): org-roam-node-at-point: don't error in non-org buffers (#2329)

`=' assumes that both objects being compared are numbers. In some
buffers `outline-level' can return nil, so `=' returns an error. `eq'
does not assume this, but does return t when comparing two numbers.
master
Hugo-Heagren 3 years ago committed by GitHub
parent b5436f3410
commit 5c06471c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      org-roam-node.el

@ -236,8 +236,7 @@ populated."
(t (org-with-wide-buffer
(while (not (or (org-roam-db-node-p)
(bobp)
;; Handle case where top-level is a heading
(= (funcall outline-level)
(eq (funcall outline-level)
(save-excursion
(org-roam-up-heading-or-point-min)
(funcall outline-level)))))

Loading…
Cancel
Save