@domql/render
Advanced tools
Comparing version 2.5.35 to 2.5.51
@@ -15,5 +15,5 @@ 'use strict' | ||
if (siblingNode.nextSibling) { | ||
parent?.insertBefore(node, siblingNode.nextSibling) | ||
parent && parent.insertBefore(node, siblingNode.nextSibling) | ||
} else { | ||
siblingNode?.insertAdjacentElement('afterend', node) | ||
siblingNode && siblingNode.insertAdjacentElement('afterend', node) | ||
} | ||
@@ -23,3 +23,4 @@ } | ||
export const insertNodeBefore = (node, siblingNode, parentNode) => { | ||
(parentNode || siblingNode.parentNode)?.insertBefore(node, siblingNode) | ||
const parent = (parentNode || siblingNode.parentNode) | ||
parent && parent.insertBefore(node, siblingNode) | ||
} | ||
@@ -26,0 +27,0 @@ |
@@ -34,10 +34,10 @@ "use strict"; | ||
if (siblingNode.nextSibling) { | ||
parent == null ? void 0 : parent.insertBefore(node, siblingNode.nextSibling); | ||
parent && parent.insertBefore(node, siblingNode.nextSibling); | ||
} else { | ||
siblingNode == null ? void 0 : siblingNode.insertAdjacentElement("afterend", node); | ||
siblingNode && siblingNode.insertAdjacentElement("afterend", node); | ||
} | ||
}; | ||
const insertNodeBefore = (node, siblingNode, parentNode) => { | ||
var _a; | ||
(_a = parentNode || siblingNode.parentNode) == null ? void 0 : _a.insertBefore(node, siblingNode); | ||
const parent = parentNode || siblingNode.parentNode; | ||
parent && parent.insertBefore(node, siblingNode); | ||
}; | ||
@@ -44,0 +44,0 @@ const assignNode = (element, parent, key, attachOptions) => { |
{ | ||
"name": "@domql/render", | ||
"version": "2.5.35", | ||
"version": "2.5.51", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "type": "module", | ||
}, | ||
"gitHead": "8d7684fd84f5c48fb5cf71e76a05eda071c118f7" | ||
"gitHead": "75eb8c4728c904ec9f050a2eb9816502196caef9" | ||
} |
11748
266