htmx.defineExtension("morph", {
isInlineSwap: function (swapStyle) {
let config = createMorphConfig(swapStyle);
- return config?.morphStyle === "outerHTML" || config?.morphStyle == null;
+ if (!config) return false;
+ return config.morphStyle === "outerHTML" || config.morphStyle == null;
},
handleSwap: function (swapStyle, target, fragment) {
let config = createMorphConfig(swapStyle);
Causes it to incorrectly nest the entire outerHTML into the innerHTML instead of only swapping the inner for inner