-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After redundantReturn is on, return is mistakenly deleted, resulting in a serious logical error. #1739
Comments
Sorry about that. The issue is due to the closure in the if statement condition causing the if statement body to be mistaken for a closure as well. A workaround for now it to put parentheses around the |
I had similar issue
|
@nysander this issue is unrelated - can you open a separate ticket to track it please |
done: #1749 |
@mlch911 fixed in 0.54.1 |
I installed 0.54.1, this issue is still there.😂 |
public func tabVCIndex(path: RouterPath?, router: Router) -> (Int, UINavigationController)? {
guard let path, let _ = path as? TabBarRouterPath, path.superPath == nil,
let tabVC = UIApplication.shared.delegate?.window??.rootViewController as? UITabBarController
else { return nil }
let vcs = tabVC.viewControllers?.compactMap { $0 as? UINavigationController }
if let path_vc = path.vc as? AnyClass, let (index, vc) = vcs?.enumerated().first { $0.element.viewControllers.first?.isMember(of: path_vc) ?? false } {
return (index, vc) // <== this return will be deleted...
}
return nil
} |
@mlch911 apologies, I oversimplified the test example and so the fix only covered some cases. I'll get this case fixed too |
@mlch911 fixed in 0.54.2 |
The text was updated successfully, but these errors were encountered: