diff --git a/LocalPackages/AIChat/Sources/AIChat/Public API/AIChatViewController.swift b/LocalPackages/AIChat/Sources/AIChat/Public API/AIChatViewController.swift index 01603f0565..1346ef2a91 100644 --- a/LocalPackages/AIChat/Sources/AIChat/Public API/AIChatViewController.swift +++ b/LocalPackages/AIChat/Sources/AIChat/Public API/AIChatViewController.swift @@ -83,8 +83,11 @@ extension AIChatViewController { public override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() - chatModel.cancelTimer() - removeWebViewController() + + if viewIfLoaded?.window == nil { + chatModel.cancelTimer() + removeWebViewController() + } } }