File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -898,13 +898,15 @@ export class View extends ViewCommon implements ViewDefinition {
898
898
CATransaction . begin ( ) ;
899
899
}
900
900
901
- if ( value instanceof UIColor ) {
902
- this . nativeViewProtected . backgroundColor = value ;
903
- } else {
904
- iosBackground . createBackgroundUIColor ( this , ( color : UIColor ) => {
905
- this . nativeViewProtected . backgroundColor = color ;
906
- } ) ;
907
- this . _setNativeClipToBounds ( ) ;
901
+ if ( this . nativeViewProtected ) {
902
+ if ( value instanceof UIColor ) {
903
+ this . nativeViewProtected . backgroundColor = value ;
904
+ } else {
905
+ iosBackground . createBackgroundUIColor ( this , ( color : UIColor ) => {
906
+ this . nativeViewProtected . backgroundColor = color ;
907
+ } ) ;
908
+ this . _setNativeClipToBounds ( ) ;
909
+ }
908
910
}
909
911
910
912
if ( ! updateSuspended ) {
@@ -915,8 +917,10 @@ export class View extends ViewCommon implements ViewDefinition {
915
917
}
916
918
917
919
_setNativeClipToBounds ( ) {
918
- const backgroundInternal = this . style . backgroundInternal ;
919
- this . nativeViewProtected . clipsToBounds = ( this . nativeViewProtected instanceof UIScrollView || backgroundInternal . hasBorderWidth ( ) || backgroundInternal . hasBorderRadius ( ) ) && ! backgroundInternal . hasBoxShadow ( ) ;
920
+ if ( this . nativeViewProtected ) {
921
+ const backgroundInternal = this . style . backgroundInternal ;
922
+ this . nativeViewProtected . clipsToBounds = ( this . nativeViewProtected instanceof UIScrollView || backgroundInternal . hasBorderWidth ( ) || backgroundInternal . hasBorderRadius ( ) ) && ! backgroundInternal . hasBoxShadow ( ) ;
923
+ }
920
924
}
921
925
922
926
private _setupPopoverControllerDelegate ( controller : UIViewController , parent : View ) {
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ export class LayoutBase extends LayoutBaseCommon {
23
23
24
24
_setNativeClipToBounds ( ) {
25
25
if ( this . clipToBounds ) {
26
- this . nativeViewProtected . clipsToBounds = true ;
26
+ if ( this . nativeViewProtected ) {
27
+ this . nativeViewProtected . clipsToBounds = true ;
28
+ }
27
29
} else {
28
30
super . _setNativeClipToBounds ( ) ;
29
31
}
Original file line number Diff line number Diff line change @@ -275,7 +275,9 @@ export class ListView extends ListViewBase {
275
275
276
276
_setNativeClipToBounds ( ) {
277
277
// Always set clipsToBounds for list-view
278
- this . ios . clipsToBounds = true ;
278
+ if ( this . ios ) {
279
+ this . ios . clipsToBounds = true ;
280
+ }
279
281
}
280
282
281
283
@profile
You can’t perform that action at this time.
0 commit comments