@pronto-tools-and-more/files 5.1.0 → 5.3.0
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.
@@ -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
|