mirror of
https://github.com/bartgryszko/react-native-circular-progress.git
synced 2026-01-25 16:25:58 +00:00
Fix array of zeros on iOS
The output of warning was being caused on every fill progress update if dash style wasn't provided so it resulted in array of eros [0,0]. `CGContextSetLineDash: invalid dash array: at least one element must be non-zero`
This commit is contained in:
parent
993059ebc7
commit
8f3494962d
@ -89,8 +89,10 @@ export default class CircularProgress extends React.PureComponent {
|
||||
? dashedBackground
|
||||
: { width:0, gap:0 };
|
||||
|
||||
const strokeDasharray = Object.values(dashedBackgroundStyle)
|
||||
.map(value => parseInt(value));
|
||||
const strokeDasharray = dashedBackground.gap > 0 ?
|
||||
Object.values(dashedBackgroundStyle)
|
||||
.map(value => parseInt(value))
|
||||
: null;
|
||||
|
||||
return (
|
||||
<View style={style}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user