fix(ios): guard against no nativeView in createBackgroundUIColor (#10229)

This commit is contained in:
Igor Randjelovic
2023-03-17 16:27:30 +01:00
committed by GitHub
parent 0173769bad
commit 9ed3c9b256

View File

@@ -33,6 +33,10 @@ export namespace ios {
const background = view.style.backgroundInternal;
const nativeView = <NativeScriptUIView>view.nativeViewProtected;
if (!nativeView) {
return;
}
if (background.clearFlags & BackgroundClearFlags.CLEAR_BOX_SHADOW) {
// clear box shadow if it has been removed!
view.setProperty('clipToBounds', true);