ryansolid / babel-plugin-jsx-dom-expressions

A JSX to DOM plugin that wraps expressions for fine grained change detection
MIT License
60 stars 10 forks source link

multipleExpressions tries to remove nodes that have already been removed #2

Closed derekrjones closed 6 years ago

derekrjones commented 6 years ago

this "fast delete" removes all nodes from the parent then sets the nodes[0] to the new element https://github.com/ryansolid/babel-plugin-jsx-dom-expressions/blob/a44861b116bc1dd90aabb8593ae9a8b5a90f2499/src/createRuntime/index.js#L131-L136

... if nodes.length > 1 then later in the clean up it will try to these remove nodes again...throwing an exception https://github.com/ryansolid/babel-plugin-jsx-dom-expressions/blob/a44861b116bc1dd90aabb8593ae9a8b5a90f2499/src/createRuntime/index.js#L148-L153

"fast delete" should set nodes.length = 1;