@jsenv/ast 6.2.16 → 6.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/ast",
3
- "version": "6.2.16",
3
+ "version": "6.2.17",
4
4
  "description": "Parse and transform HTML, CSS and JS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,7 +39,7 @@
39
39
  "acorn-import-attributes": "1.9.5",
40
40
  "acorn-walk": "8.3.3",
41
41
  "parse5": "7.1.2",
42
- "postcss": "8.4.40",
42
+ "postcss": "8.4.41",
43
43
  "postcss-value-parser": "4.2.0"
44
44
  }
45
45
  }
@@ -143,6 +143,9 @@ const ensureLineBreaksBetweenHtmlNodes = (rootNode) => {
143
143
  const ensureChildrenSurroundedByLinebreaks = (headOrBody) => {
144
144
  const { childNodes } = headOrBody;
145
145
  const firstChild = childNodes[0];
146
+ if (!firstChild) {
147
+ return;
148
+ }
146
149
  if (firstChild.nodeName !== "#text") {
147
150
  mutationCallbackSet.add(() => {
148
151
  insertHtmlNodeBefore(