From b8d79c5ff86537ca8b8987a00c988ed9434d9f6a Mon Sep 17 00:00:00 2001 From: Hirbod <504909+hirbod@users.noreply.github.com> Date: Mon, 10 Jun 2024 21:56:00 +0200 Subject: [PATCH] fix: uiManager can be nil --- ios/TrueSheetView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/TrueSheetView.swift b/ios/TrueSheetView.swift index 0ed0916..d763884 100644 --- a/ios/TrueSheetView.swift +++ b/ios/TrueSheetView.swift @@ -143,7 +143,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate { guard let containerView else { return } let size = CGSize(width: width, height: containerView.bounds.height) - bridge?.uiManager.setSize(size, for: containerView) + bridge?.uiManager?.setSize(size, for: containerView) } func viewControllerWillAppear() { @@ -297,7 +297,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate { @objc func setScrollableHandle(_ tag: NSNumber?) { - let view = bridge?.uiManager.view(forReactTag: tag) as? RCTScrollView + let view = bridge?.uiManager?.view(forReactTag: tag) as? RCTScrollView rctScrollView = view }