rehypejs / rehype-minify

plugins to minify HTML
https://unifiedjs.com
MIT License
89 stars 16 forks source link

rehype-minify-whitspace: TypeError: Cannot read properties of undefined (reading 'hidden') #49

Closed tripodsan closed 1 year ago

tripodsan commented 1 year ago

Initial checklist

Affected packages and versions

rehype-minify-whitespace@6.0.0

Link to runnable example

No response

Steps to reproduce

passing a node w/o properties causes an error in:

https://github.com/rehypejs/rehype-minify/blob/main/packages/rehype-minify-whitespace/lib/index.js#L291

Expected behavior

node w/o properties should be ignored.

Actual behavior

node w/o properties causes an error.

Runtime

Node v16

Package manager

npm 8

OS

macOS

Build and bundle tools

No response

wooorm commented 1 year ago

Hi. This is expected. This is one of the major changes. All elements must have properties (previously they should have properties). Make sure when you have your own code that generates elements, that a properties object exists!

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.