We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7be7ee9 commit 8c881e6Copy full SHA for 8c881e6
1 file changed
lib/get-mini-toc-items.js
@@ -16,7 +16,7 @@ module.exports = function getMiniTocItems (html, maxHeadingLevel = 3) {
16
const items = headings
17
.get()
18
.filter(item => {
19
- if (!item.parent) return true
+ if (!item.parent || !item.parent.attribs) return true
20
// Hide any items that belong to a hidden div
21
const { attribs } = item.parent
22
return !('hidden' in attribs)
0 commit comments