TylorS / cycle-snabbdom

Alternative DOM driver utilizing the snabbdom library
MIT License
41 stars 5 forks source link

Fixing makeVNodeWrapper case sensitivity #13

Closed SkaterDad closed 8 years ago

SkaterDad commented 8 years ago

I discovered that cycle-snabbdom wasn't patching over the render target anymore.

selectorTagName === rootElement.tagName was evaluating false. One was div, the other was DIV.

Added test which ensures the root vNode doesn't get wrapped (by checking child counts) if it matches the render target selector.

Made the is this identical logic all uppercase for id, tagname, and class. I don't see any reason case should matter for id or class.

Test passed after implementing the changes. Worked properly in my example app also.

TylorS commented 8 years ago

Thank you @SkaterDad! Merged :+1:

TylorS commented 8 years ago

Released in v 1.0.3

SkaterDad commented 8 years ago

My pleasure!

On Wed, Feb 3, 2016, 11:28 AM Tylor Steinberger notifications@github.com wrote:

Released in v 1.0.3

— Reply to this email directly or view it on GitHub https://github.com/TylorS/cycle-snabbdom/pull/13#issuecomment-179361905.