[AltServer] Updates NSMultipleUnderlyingErrorsKey #available check to include macOS

This commit is contained in:
Riley Testut
2022-04-20 15:19:09 -07:00
parent 2262f04fb3
commit eef23ae49d

View File

@@ -79,7 +79,7 @@ extension NSError
userInfo[NSUnderlyingErrorKey] = sanitizedError userInfo[NSUnderlyingErrorKey] = sanitizedError
} }
if #available(iOS 14.5, *), let underlyingErrors = userInfo[NSMultipleUnderlyingErrorsKey] as? [Error] if #available(iOS 14.5, macOS 11.3, *), let underlyingErrors = userInfo[NSMultipleUnderlyingErrorsKey] as? [Error]
{ {
let sanitizedErrors = underlyingErrors.map { ($0 as NSError).sanitizedForCoreData() } let sanitizedErrors = underlyingErrors.map { ($0 as NSError).sanitizedForCoreData() }
userInfo[NSMultipleUnderlyingErrorsKey] = sanitizedErrors userInfo[NSMultipleUnderlyingErrorsKey] = sanitizedErrors