@domql/render
Advanced tools
Comparing version 2.5.29 to 2.5.30
@@ -13,3 +13,8 @@ 'use strict' | ||
export const insertNodeAfter = (node, siblingNode, parentNode) => { | ||
(parentNode || siblingNode.parentNode)?.insertBefore(node, siblingNode) | ||
const parent = (parentNode || siblingNode.parentNode) | ||
if (siblingNode.nextSibling) { | ||
parent?.insertBefore(node, siblingNode.nextSibling) | ||
} else { | ||
siblingNode?.insertAdjacentElement('afterend', node) | ||
} | ||
} | ||
@@ -16,0 +21,0 @@ |
@@ -32,4 +32,8 @@ "use strict"; | ||
const insertNodeAfter = (node, siblingNode, parentNode) => { | ||
var _a; | ||
(_a = parentNode || siblingNode.parentNode) == null ? void 0 : _a.insertBefore(node, siblingNode); | ||
const parent = parentNode || siblingNode.parentNode; | ||
if (siblingNode.nextSibling) { | ||
parent == null ? void 0 : parent.insertBefore(node, siblingNode.nextSibling); | ||
} else { | ||
siblingNode == null ? void 0 : siblingNode.insertAdjacentElement("afterend", node); | ||
} | ||
}; | ||
@@ -36,0 +40,0 @@ const insertNodeBefore = (node, siblingNode, parentNode) => { |
{ | ||
"name": "@domql/render", | ||
"version": "2.5.29", | ||
"version": "2.5.30", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "type": "module", | ||
}, | ||
"gitHead": "df470e5a96cda567c9d99cc98337eac0136d0890" | ||
"gitHead": "c1547b94101ec41cb0ef08dbee37b81a2a541126" | ||
} |
11780
265