fix(ios): ListView _prepareCell null safety (#10001)

closes https://github.com/NativeScript/NativeScript/issues/10000
This commit is contained in:
Nathan Walker
2022-08-19 21:32:42 -07:00
committed by GitHub
parent ca3d9bdc13
commit 56f861df20

View File

@@ -463,7 +463,7 @@ export class ListView extends ListViewBase {
cell.owner = new WeakRef(view);
} else if (cell.view !== view) {
this._removeContainer(cell);
(<UIView>cell.view.nativeViewProtected).removeFromSuperview();
(<UIView>cell.view?.nativeViewProtected)?.removeFromSuperview();
cell.owner = new WeakRef(view);
}