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 {
898898 CATransaction . begin ( ) ;
899899 }
900900
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+ }
908910 }
909911
910912 if ( ! updateSuspended ) {
@@ -915,8 +917,10 @@ export class View extends ViewCommon implements ViewDefinition {
915917 }
916918
917919 _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+ }
920924 }
921925
922926 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 {
2323
2424 _setNativeClipToBounds ( ) {
2525 if ( this . clipToBounds ) {
26- this . nativeViewProtected . clipsToBounds = true ;
26+ if ( this . nativeViewProtected ) {
27+ this . nativeViewProtected . clipsToBounds = true ;
28+ }
2729 } else {
2830 super . _setNativeClipToBounds ( ) ;
2931 }
Original file line number Diff line number Diff line change @@ -275,7 +275,9 @@ export class ListView extends ListViewBase {
275275
276276 _setNativeClipToBounds ( ) {
277277 // Always set clipsToBounds for list-view
278- this . ios . clipsToBounds = true ;
278+ if ( this . ios ) {
279+ this . ios . clipsToBounds = true ;
280+ }
279281 }
280282
281283 @profile
You can’t perform that action at this time.
0 commit comments