Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: spread should not traverse children elements #245

Merged
merged 1 commit into from Mar 22, 2019

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
@tsnieman
Copy link

tsnieman 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