File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,16 @@ export class ActivityIndicator extends ActivityIndicatorBase {
33
33
34
34
private updateStrokeRadius ( width : number , height : number ) {
35
35
// radius is maxed to 72
36
- const min = Math . min ( Math . min ( width , height ) , 144 ) ;
37
- const strokeWidth = min / 25 ;
38
- const scale = Screen . mainScreen . scale ;
36
+ const nativeView = this . nativeViewProtected ;
37
+ if ( nativeView ) {
38
+ const min = Math . min ( Math . min ( width , height ) , 144 ) ;
39
+ const strokeWidth = min / 25 ;
40
+ const scale = Screen . mainScreen . scale ;
39
41
40
- const radius = min / 2 - strokeWidth / 2 ;
41
- this . nativeViewProtected . strokeWidth = strokeWidth ;
42
- this . nativeViewProtected . radius = radius / scale ;
42
+ const radius = min / 2 - strokeWidth / 2 ;
43
+ nativeView . strokeWidth = strokeWidth ;
44
+ nativeView . radius = radius / scale ;
45
+ }
43
46
}
44
47
45
48
public onMeasure ( widthMeasureSpec : number , heightMeasureSpec : number ) : void {
You can’t perform that action at this time.
0 commit comments