Skip to content

Commit 2b75f41

Browse files
Merge pull request #432 from contentful/fix/null-values-in-arrays
fix: prevent null values in resolved objects arrays
2 parents eb6b889 + 6d850d0 commit 2b75f41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Contentful/LinkResolver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class LinkResolver {
4646
let onlyKeysString = linkKey[firstKeyIndex ..< linkKey.endIndex]
4747
// Split creates a [Substring] array, but we need [String] to index the cache
4848
let keys = onlyKeysString.split(separator: ",").map { String($0) }
49-
let items: [AnyObject] = keys.compactMap { dataCache.item(for: $0) }
49+
let items = keys.compactMap { dataCache.item(for: $0) }
5050
for callback in callbacksList {
5151
callback(items as AnyObject)
5252
}

0 commit comments

Comments
 (0)