Use more secure access
feixue299 opened this issue · 1 comments
feixue299 commented
let deduplicatedMatName = materialCountDict.filter({
return $0.value.map({
Substring($0.name) // Swift wants a Substring for some reason
}).contains(matName)
})[0].key.name
to
let deduplicatedMatName = materialCountDict.filter({
return $0.value.map({
Substring($0.name) // Swift wants a Substring for some reason
}).contains(matName)
}).first?.key.name
SamusAranX commented
Fixed in version 1.7.