diff --git a/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift b/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift index 1692533f31b..895a005be9a 100644 --- a/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift +++ b/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift @@ -28,16 +28,18 @@ struct PrivateTabsView: View { case .touchID: return .touchID default: - var error: NSError? - let policyEvaluation = context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) - - if policyEvaluation { - return .pinCode - } else { - if (error as? LAError)?.code == .passcodeNotSet { - return .noAuthentication - } - } + return .noAuthentication + } + } + + var error: NSError? + let policyEvaluation = context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) + + if policyEvaluation { + return .pinCode + } else { + if (error as? LAError)?.code == .passcodeNotSet { + return .noAuthentication } }