mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 05:04:24 +00:00
feat(block): validate heading level as integer in block-heading-level function
This commit is contained in:
@@ -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)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user