about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--org-clubhouse.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/org-clubhouse.el b/org-clubhouse.el
index ce136a51f016..4f162d955bd4 100644
--- a/org-clubhouse.el
+++ b/org-clubhouse.el
@@ -257,13 +257,14 @@ If set to nil, will never create stories with labels")
 
 (defun org-element-and-children-at-point ()
   (let* ((elt (org-element-find-headline))
-         (contents-begin (plist-get elt :contents-begin))
+         (contents-begin (or (plist-get elt :contents-begin)
+                             (plist-get elt :begin)))
          (end   (plist-get elt :end))
          (level (plist-get elt :level))
          (children '()))
     (save-excursion
       (goto-char (+ contents-begin (length (plist-get elt :title))))
-      (while (<= (point) end)
+      (while (< (point) end)
         (let* ((next-elt (org-element-at-point))
                (elt-type (car next-elt))
                (elt      (cadr next-elt)))