Closed derekrjones closed 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
nodes.length > 1
"fast delete" should set nodes.length = 1;
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;