@ecency/render-helper 2.4.16 → 2.4.17
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
|
@@ -481,7 +481,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext) {
|
|
|
481
481
|
const imgHTML = createImageHTML(href, isLCP);
|
|
482
482
|
const doc = DOMParser.parseFromString(imgHTML, "text/html");
|
|
483
483
|
const replaceNode = doc.body?.firstChild || doc.firstChild;
|
|
484
|
-
if (replaceNode) {
|
|
484
|
+
if (replaceNode && el.parentNode) {
|
|
485
485
|
const importedNode = el.ownerDocument.importNode(replaceNode, true);
|
|
486
486
|
el.parentNode.replaceChild(importedNode, el);
|
|
487
487
|
}
|
|
@@ -975,7 +975,9 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext) {
|
|
|
975
975
|
blockquote.appendChild(p2);
|
|
976
976
|
blockquote.appendChild(textNode);
|
|
977
977
|
blockquote.appendChild(a2);
|
|
978
|
-
el.parentNode
|
|
978
|
+
if (el.parentNode) {
|
|
979
|
+
el.parentNode.replaceChild(blockquote, el);
|
|
980
|
+
}
|
|
979
981
|
return;
|
|
980
982
|
}
|
|
981
983
|
}
|