Skip to content

Conversation

@AlbertLucianto
Copy link
Contributor

Should fix #244

Sorry for the bug. When traversing the spread attributes, an element traverses spread attributes in children elements as well. This fix simply changes the traversal into a simple loop. I also add a test case for this one.

@gajus gajus merged commit 4a47f35 into gajus:master Mar 22, 2019
@gajus
Copy link
Owner

gajus commented Mar 22, 2019

🎉 This PR is included in version 5.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Mar 22, 2019
@tyler-dot-earth
Copy link

tyler-dot-earth commented Apr 3, 2019

EDIT: errr, might've had a bug in my own code. Sorry for the noise :( 👎 Thanks again for the work on this feature, it's awesome ❤️

@AlbertLucianto Wonderful work on #243! I understand the reasoning behind #245 here as well, though it would be nice if children traversal worked in the same file when spreading on children, like such:

  return (
    <div
      {...wrapperProps}
      styleName="wrapper"
    >
      <SingleLineInput
        {...otherProps}
        styleName="input"
      />

      <div styleName="icon-wrapper">
        <Icon icon="search" />
      </div>
    </div>
  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

className applied to incorrect nodes in 5.2.2

3 participants