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

node not getting removed #1

Closed derekrjones closed 6 years ago

derekrjones commented 6 years ago

in each replacing [li.foo] with [li.bar] results in failure to remove previous node (so we get both)

https://github.com/ryansolid/babel-plugin-jsx-dom-expressions/blob/a44861b116bc1dd90aabb8593ae9a8b5a90f2499/src/createRuntime/index.js#L123

https://github.com/ryansolid/babel-plugin-jsx-dom-expressions/blob/a44861b116bc1dd90aabb8593ae9a8b5a90f2499/src/createRuntime/reconcileArrays.js#L157-L159

should be i <= nmax not i < ns (ns is the array)

ryansolid commented 6 years ago

Thank you, multipleExpressions I use a lot less and haven't the same coverage in my projects. I think this is the push I needed to get the unit tests going.