Skip to content

Commit cb873ca

Browse files
committed
fix bug //JSON.stringify(props) cause error "Converting circular structure to JSON"
1 parent 68b30cb commit cb873ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export default class PickerAndroid extends React.Component{
5353
}
5454

5555
shouldComponentUpdate(props, state, context){
56-
return JSON.stringify([props, state, context]) !== JSON.stringify([this.props, this.state, this.context]);
56+
//JSON.stringify(props) cause error "Converting circular structure to JSON"
57+
return JSON.stringify([state, context]) !== JSON.stringify([this.state, this.context]);
5758
}
5859

5960
_stateFromProps(props){

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-picker-android",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "react-native-picker-android",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)