Skip to content

Commit 4b5b12c

Browse files
authored
fix(build): remove ungated >= Swift 5.4 features to allow building on Xcode 12 (#1737)
1 parent 0b1f97e commit 4b5b12c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Storage/SQLite/ModelSchema+SQLite.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@ extension ModelSchema {
118118
/// Create SQLite indexes corresponding to secondary indexes in the model schema
119119
func createIndexStatements() -> String {
120120
var statement = ""
121-
for index in indexes {
122-
if case let .index(fields, name) = index, let name = name {
123-
statement += CreateIndexStatement(modelSchema: self, fields: fields, indexName: name).stringValue
124-
}
121+
for case let .index(fields, name?) in indexes {
122+
statement += CreateIndexStatement(
123+
modelSchema: self,
124+
fields: fields,
125+
indexName: name
126+
)
127+
.stringValue
125128
}
126129
return statement
127130
}

0 commit comments

Comments
 (0)