Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'name') #41

Open
cmer opened this issue Feb 27, 2024 · 3 comments
Open

TypeError: Cannot read properties of undefined (reading 'name') #41

cmer opened this issue Feb 27, 2024 · 3 comments

Comments

@cmer
Copy link

cmer commented Feb 27, 2024

I am running into an exception. Not sure what the root cause is. Here's the stack trace and a screenshot of where it crashes. Let me know what else you need to solve this!

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name')
    at syncNodeFrom (idiomorph.esm.js:294:53)
    at morphOldNodeTo (idiomorph.esm.js:147:21)
    at morphNormalizedContent (idiomorph.esm.js:91:35)
    at Object.morph (idiomorph.esm.js:53:20)
    at event.detail.render [as renderElement] (application.js:24:15)
    at FrameRenderer.loadFrameElement (turbo.es2017-esm.js:1900:10)
    at turbo.es2017-esm.js:1889:12
    at Bardo.preservingPermanentElements (turbo.es2017-esm.js:1721:11)
    at FrameRenderer.preservingPermanentElements (turbo.es2017-esm.js:1814:17)
    at FrameRenderer.render (turbo.es2017-esm.js:1888:10)
syncNodeFrom @ idiomorph.esm.js:294
morphOldNodeTo @ idiomorph.esm.js:147
morphNormalizedContent @ idiomorph.esm.js:91
morph @ idiomorph.esm.js:53
event.detail.render @ application.js:24
loadFrameElement @ turbo.es2017-esm.js:1900
(anonymous) @ turbo.es2017-esm.js:1889
preservingPermanentElements @ turbo.es2017-esm.js:1721
preservingPermanentElements @ turbo.es2017-esm.js:1814
render @ turbo.es2017-esm.js:1888
await in render (async)
render @ turbo.es2017-esm.js:1888
await in render (async)
renderSnapshot @ turbo.es2017-esm.js:1529
render @ turbo.es2017-esm.js:1489
await in render (async)
loadFrameResponse_fn @ turbo.es2017-esm.js:6001
await in loadFrameResponse_fn (async)
loadResponse @ turbo.es2017-esm.js:5824
await in loadResponse (async)
formSubmissionSucceededWithResponse @ turbo.es2017-esm.js:5926
requestSucceededWithResponse @ turbo.es2017-esm.js:1169
receive @ turbo.es2017-esm.js:848
perform @ turbo.es2017-esm.js:825
await in perform (async)
start @ turbo.es2017-esm.js:1109
formSubmitted @ turbo.es2017-esm.js:5876
(anonymous) @ turbo.es2017-esm.js:1390

CleanShot 2024-02-27 at 16 38 40@2x

CleanShot 2024-02-27 at 16 42 15@2x

@cmer
Copy link
Author

cmer commented Feb 27, 2024

Adding another bogus attribute (eg foo="bar") to my turbo-frame solves the issue. It doesn't like the fact that there's only 1 attribute.

@jameskerr
Copy link

I'm running into this as well in the same way.

@matchu
Copy link

matchu commented Jul 4, 2024

For my Turbo Frames, I'm working around this by:

Idiomorph.morph(currentElement, newElement.innerHTML, {
	morphStyle: "innerHTML",
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants