@redotech/redo-hydrogen 1.4.3 → 1.4.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.4.4
2
+
3
+ - Bugfix: remove InfoModal using relative parent not document.head
4
+
1
5
  ### 1.4.3
2
6
 
3
7
  - Append redo opted in attributes to cart attributes instead of replacing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redotech/redo-hydrogen",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Utilities to enable and disable Redo coverage on Hydrogen stores",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -25,7 +25,9 @@ function useInjectStyle(styleContent: string) {
25
25
  styleTag.textContent = styleContent;
26
26
  document.head.appendChild(styleTag);
27
27
  return () => {
28
- document.head.removeChild(styleTag);
28
+ if(styleTag?.parentElement) {
29
+ styleTag.parentElement.removeChild(styleTag);
30
+ }
29
31
  };
30
32
  }, [styleContent]);
31
33
  }