jerolimov / react-native-sidebar

MIT License
27 stars 13 forks source link

open function for right side broken? #3

Closed jonegerton closed 7 years ago

jonegerton commented 7 years ago

Is this.props.rightSidebar && side !== 'right' correct in the line below? Would expect === 'right' on that line instead of !== 'right'

open(side) {
    if (this.props.leftSidebar && side !== 'right') {
        this.openLeftSidebar();
    } else if (this.props.rightSidebar && side !== 'right') {
        this.openRightSidebar();
    } else {
        this.close();
    }
}
jerolimov commented 7 years ago

Your right, this should be this.props.rightSidebar && side === 'right'. Can you open a PR?

jerolimov commented 7 years ago

Thanks!