Closed jcayzac closed 4 years ago
Hey there!
children
.console.log(parent)
before line 112 in rehype-minify-whitespace/index.js#L112
Thanks!
children
is undefined, hence the error. I printed out the parent from line 111 and it was { type: 'element', tagName: 'div', properties: { id: 'lunr-search' } }
, an element I injected using rehype-document
and unist-builder
. I guess I just missed the part in Unified's docs about children being required.
Adding a children: []
to the call to unitst-builder
fixes my build.
Cheers,
Ahh, yeah, children
is required on element
s!
P.S., hastscript
can help with create hast elements (unist-builder
is a level higher, for HTML you’ll mostly create elements so hastscript
is shorter)
Hi there,
My site started failing with the following error after I deleted my
yarn.lock
and regenerated it based on all the latest versions:I had to remove
rehype-preset-minify
for now.