feat(block): validate heading level as integer in block-heading-level function

This commit is contained in:
Mega Yu
2026-05-08 20:51:29 +08:00
committed by Tienson Qin
parent 5a78fce3f0
commit eaa878de2f

View File

@@ -648,7 +648,8 @@
(defn- block-heading-level
[block level]
(or (when-let [heading-level (:block/heading-level block)]
(when (<= 1 heading-level 6)
(when (and (integer? heading-level)
(<= 1 heading-level 6))
heading-level))
(heading-value->level (pu/lookup block :logseq.property/heading) level)))