mirror of
https://github.com/bartgryszko/react-native-circular-progress.git
synced 2026-01-18 16:13:10 +00:00
fixed crash if onFillChange is not provided
onFillChange is not required by default.
This commit is contained in:
parent
cef865aa16
commit
5dc4627947
@ -10,10 +10,11 @@ export default class AnimatedCircularProgress extends React.PureComponent {
|
||||
this.state = {
|
||||
fillAnimation: new Animated.Value(props.prefill),
|
||||
};
|
||||
|
||||
this.state.fillAnimation.addListener(({ value }) =>
|
||||
props.onFillChange(value)
|
||||
);
|
||||
if(props.onFillChange){
|
||||
this.state.fillAnimation.addListener(({ value }) =>
|
||||
props.onFillChange(value)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user