You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m getting the following error when using idiomorph with htmx-ws:
htmx-1.js:1899 TypeError: Cannot read properties of undefined (reading 'swapStyle')
at Object.isInlineSwap (htmx-idiomorph-0.3.js:863:27)
at isInlineSwap (htmx-1.js:695:35)
at htmx-1.js:733:30
at forEach (htmx-1.js:369:21)
at Object.oobSwap (htmx-1.js:726:17)
at WebSocket.<anonymous> (htmx-ws-1.js:148:10)
@th3l0g4n Hmm, but that’s the thing, this error triggers when hx-swap-oob='morph' is not added when hx-ext='morph' is specified on the page (because, say, you want to use a different swap style).
So, basically, it happens when the plugin is specified but not used in the page and another hx-swap-oob triggers. So this is a bug with this plugin. (If the hx-swap-oob is not morph, it should not affect things at all.)
Note: I’ve now worked around this in Kitten by granularly adding the hx-ext='morph' attribute only to DOM elements where hx-swap-oob='morph' is specified.
In case it helps anyone else, here’s the relevant patch:
#32 This looks to be a typo that has already been fixed but the current release version 0.3.0 does not include this typo fix. We need a new release cut at some point
I’m getting the following error when using idiomorph with htmx-ws:
The referenced point in htmx is:
And the place in idiomorph is:
If I can narrow it down further, I’ll update the issue.
The text was updated successfully, but these errors were encountered: