html-react-parser 5.0.0 → 5.0.1

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/README.md CHANGED
@@ -437,6 +437,20 @@ Migrated to TypeScript. CommonJS imports require the `.default` key:
437
437
  const parse = require('html-react-parser').default;
438
438
  ```
439
439
 
440
+ If you're getting the error:
441
+
442
+ ```
443
+ Argument of type 'ChildNode[]' is not assignable to parameter of type 'DOMNode[]'.
444
+ ```
445
+
446
+ Then use type assertion:
447
+
448
+ ```ts
449
+ domToReact(domNode.children as DOMNode[], options);
450
+ ```
451
+
452
+ See [#1126](https://github.com/remarkablemark/html-react-parser/issues/1126#issuecomment-1784188447).
453
+
440
454
  ### v4
441
455
 
442
456
  [htmlparser2](https://github.com/fb55/htmlparser2) has been upgraded to [v9](https://github.com/fb55/htmlparser2/releases/tag/v9.0.0).
@@ -2709,7 +2709,7 @@
2709
2709
  else if (element.attribs) {
2710
2710
  props = (0, attributes_to_props_1.default)(element.attribs, element.name);
2711
2711
  }
2712
- var children = null;
2712
+ var children = void 0;
2713
2713
  switch (node.type) {
2714
2714
  case 'script':
2715
2715
  case 'style':