From 542936b7331f7c5592836890f3d4c674fea518bc Mon Sep 17 00:00:00 2001 From: An Tran Date: Sat, 12 Feb 2022 06:20:55 +0800 Subject: [PATCH] fix: reseting scenarios doesn't dismiss modal child view controller --- Sources/Scenarios/BaseScenariosManager.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Scenarios/BaseScenariosManager.swift b/Sources/Scenarios/BaseScenariosManager.swift index 573181b..23d7cef 100644 --- a/Sources/Scenarios/BaseScenariosManager.swift +++ b/Sources/Scenarios/BaseScenariosManager.swift @@ -153,6 +153,9 @@ open class BaseScenariosManager { } appController.setScenario(activeScenarioId) } else { + if (appController.rootViewController.presentedViewController) != nil { + appController.rootViewController.dismiss(animated: false, completion: nil) + } appController.setScenarioSelector(makeScenarioSelector()) } }