-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix destructured props detection in stateless components (fixes #326)
- Loading branch information
Showing
2 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This addition broke the Radium build by causing false positives on this line:
https://github.com/FormidableLabs/radium/blob/21bf3a9dad906dc2ec903713380246da25762a96/src/resolve-styles.js#L180
This is detected as being inside a stateless component (even though it is just a function), and because the condition never checks that it is a destructuring assignment, it fails.