Skip to content

Commit 6ad025f

Browse files
committed
chore: fix more warnings
1 parent 7565472 commit 6ad025f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/swift/Sources/Models/Model.swift.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ open class {{ definition | modelType(spec) | raw }}: Codable {
8282
return {{ definition.name | caseUcfirst }}(
8383
{%~ for property in definition.properties %}
8484
{%~ set isDocument = definition.name | lower == 'document' %}{# Temporary Fix until BE is fixed to return all attributes #}
85-
{{ property.name | escapeSwiftKeyword | removeDollarSign }}: {% if property.sub_schema -%}
85+
{{ property.name | removeDollarSign }}: {% if property.sub_schema -%}
8686
{%- if property.type == 'array' -%}
8787
(map["{{property.name }}"] as{% if isDocument %}?{% else %}{% if property.required %}!{% else %}?{% endif %}{% endif %} [[String: Any]]{% if isDocument %} ?? []{% elseif not property.required %} ?? []{% endif %}).map { {{property.sub_schema | caseUcfirst}}.from(map: $0) }
8888
{%- else -%}

templates/swift/Sources/OAuth/WebAuthComponent.swift.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class WebAuthComponent {
4444
url: url,
4545
callbackURLScheme: callbackScheme
4646
) { callbackURL, error in
47-
if let error = error {
47+
if error != nil {
4848
cleanUp()
4949
} else if let callbackURL = callbackURL {
5050
// handle cookies here itself!
@@ -161,7 +161,7 @@ class PresentationContextProvider: NSObject, ASWebAuthenticationPresentationCont
161161
static let shared = PresentationContextProvider()
162162

163163
func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {
164-
if let mainWindow = OSApplication.shared.windows.first { $0.isKeyWindow } {
164+
if let mainWindow = OSApplication.shared.windows.first(where: { $0.isKeyWindow }) {
165165
return mainWindow
166166
}
167167

0 commit comments

Comments
 (0)