@pronto-tools-and-more/files 5.0.2 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ // begin pronto react
2
+ globalThis.fixRender = (that) => {
3
+ const root = that.parentNode.parentNode.parentNode.parentNode.parentNode;
4
+ const ancestor = that.parentNode.parentNode.parentNode.parentNode;
5
+ const realNodes = [];
6
+ for (let i = 1; i < 2; i++) {
7
+ const child = ancestor.children[i];
8
+ const realNodeClassName = child.children[0].className;
9
+ const realNode = child.children[0].children[0];
10
+ realNode.className = realNodeClassName;
11
+ realNodes.push(realNode);
12
+ }
13
+ const realChildren = [];
14
+ for (let i = 2; i < ancestor.children.length; i++) {
15
+ const child = ancestor.children[i];
16
+ if (child.nodeName === "storefront-section") {
17
+ realChildren.push(child.children[0].children[0]);
18
+ } else {
19
+ realChildren.push(child);
20
+ }
21
+ }
22
+ realNodes[0].append(...realChildren);
23
+ root.replaceWith(realNodes[0]);
24
+ };
25
+
26
+ // end pronto react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/files",
3
- "version": "5.0.2",
3
+ "version": "5.2.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},