bigskysoftware / bigskysoftware/idiomorph
enabling morph ext breaks isInlineSwap for the hx-swap-oob="innerHTML" cases (Potential fix included)
- Dominant language
- HTML
- Stars
- 1.1k
- Forks
- 57
- Avg merge
- 9h 58m
- Merged PRs (30d)
- 4
Description
```diff
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.