Skip to content

Commit 8a307c7

Browse files
committed
use simple if instead
1 parent 4e0c5a2 commit 8a307c7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/htmx.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,8 +1481,9 @@ var htmx = (function() {
14811481
// @ts-ignore if elt is template content will be valid so use as inner content
14821482
fragment = oobElementClone.content || asParentNode(oobElementClone) // if this is not an inline swap, we use the content of the node, not the node itself
14831483
}
1484-
// outerHTMLStrip swapStyle will strip wrapping tag above but do outerHTML swap of inner contents
1485-
swapStyle = swapStyle.replace('Strip', '')
1484+
if (swapStyle === 'outerHTMLStrip') {
1485+
swapStyle = 'outerHTML' // outerHTMLStrip will strip wrapping tag above but do outerHTML swap of inner contents
1486+
}
14861487

14871488
const beforeSwapDetails = { shouldSwap: true, target, fragment }
14881489
if (!triggerEvent(target, 'htmx:oobBeforeSwap', beforeSwapDetails)) return

0 commit comments

Comments
 (0)