dom-expressions icon indicating copy to clipboard operation
dom-expressions copied to clipboard

Fix insertExpression throw

Open danieltroger opened this issue 1 year ago • 2 comments

Mends part one of https://github.com/solidjs/solid/issues/2030 by selectively walking around that specific case

Tested and actually fixes the issue. Working test reproduction with yarn patch here: yarn && yarn dev

bug-test.zip

danieltroger avatar Jan 15 '24 10:01 danieltroger

@ryansolid did you have time to take a look here? :)

danieltroger avatar Jan 22 '24 08:01 danieltroger

Understanding this, this is guarding specifically around trying to insert the parent in itself. Like the check is one level deep. I suppose that is all we need, because it is fragments that are breaking this. Actually no that isn't the case. This would break again as soon as the parent doesn't equal the inserted element. We could trace up but I think this needs some more though. Need to get back to the basis of why we grabbing the parent this way. I'm a bit foggy its been like 6 years since I wrote this code.

ryansolid avatar Jan 22 '24 22:01 ryansolid

I think the work in #382 supercedes this specific fix. Plus I'm tenatively working with this statement gone in the next significant version. In so since we aren't merging this I'm going to close this put our efforts there.

ryansolid avatar Jan 28 '25 00:01 ryansolid