mirror of
https://github.com/bartgryszko/react-native-circular-progress.git
synced 2026-01-18 16:13:10 +00:00
Merge pull request #31 from livioso/patch-1
Use Math.min / Math.max for extractFill.
This commit is contained in:
commit
73b1aa72d9
@ -16,13 +16,7 @@ export default class CircularProgress extends React.Component {
|
||||
}
|
||||
|
||||
extractFill(fill) {
|
||||
if (fill < 0.01) {
|
||||
return 0;
|
||||
} else if (fill > 100) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
return fill;
|
||||
return Math.min(100, Math.max(0, fill));
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user