@ecency/render-helper 2.4.18 → 2.4.19
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/dist/node/index.cjs
CHANGED
|
@@ -1317,8 +1317,8 @@ function traverse(node, forApp, depth = 0, state = { firstImageFound: false }, p
|
|
|
1317
1317
|
if (!node || !node.childNodes) {
|
|
1318
1318
|
return;
|
|
1319
1319
|
}
|
|
1320
|
-
Array.from(
|
|
1321
|
-
|
|
1320
|
+
const children = Array.from(node.childNodes);
|
|
1321
|
+
children.forEach((child) => {
|
|
1322
1322
|
if (!child) return;
|
|
1323
1323
|
if (child.nodeName.toLowerCase() === "a") {
|
|
1324
1324
|
a(child, forApp, parentDomain, seoContext);
|
|
@@ -1335,9 +1335,8 @@ function traverse(node, forApp, depth = 0, state = { firstImageFound: false }, p
|
|
|
1335
1335
|
if (child.nodeName.toLowerCase() === "p") {
|
|
1336
1336
|
p(child);
|
|
1337
1337
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
traverse(currentChild, forApp, depth + 1, state, parentDomain, seoContext);
|
|
1338
|
+
if (child.parentNode) {
|
|
1339
|
+
traverse(child, forApp, depth + 1, state, parentDomain, seoContext);
|
|
1341
1340
|
}
|
|
1342
1341
|
});
|
|
1343
1342
|
}
|