eftalyurtseven / react-native-wheel-of-fortune

React Native Wheel of Fortune Plugin
103 stars 89 forks source link

winner={0} showing random winners #18

Closed arunkarnann closed 3 years ago

arunkarnann commented 3 years ago

winner={0} showing random winners, means delaring first element of the array always returns random results

rafikhdj commented 3 years ago

Yes because, in his class of the Wheel, you can choose between your choice and a random choice this.winner = {this.winner ? this.winner : radom(winner) } so when you set winner to 0 it means equal to false as : {false ? this.winner : radom(winner) } => radom(winner)