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

FAB container flexDirection code #1707

Closed
bkDJ opened this issue Mar 20, 2018 · 1 comment
Closed

FAB container flexDirection code #1707

bkDJ opened this issue Mar 20, 2018 · 1 comment

Comments

@bkDJ
Copy link

bkDJ commented Mar 20, 2018

NativeBase/src/basic/Fab.js

Lines 157 to 159 in 9b01cb9

flexDirection: this.props.direction
? this.props.direction == "left || right" ? "row" : "column"
: "column",

Checking the value of a string with || inside another string seems suspicious. Is this accomplishing what's intended? If not, I'd recommend something like

flexDirection: this.props.direction
          ? this.props.direction.match(/^(?:left|right)$/) ? "row" : "column"
          : "column",
@SupriyaKalghatgi
Copy link
Contributor

Fixed with 2.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants