We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58d66fb commit bde332fCopy full SHA for bde332f
.gitignore
@@ -7,3 +7,4 @@ Pods
7
Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Support/awsconfiguration.json
8
Example/AmazonFreeRTOSDemo/AmazonFreeRTOSDemo/Amazon/AmazonConstants.swift
9
xcodebuild.log
10
+InternalTest
AmazonFreeRTOS/AmazonFreeRTOSManager.swift
@@ -1006,7 +1006,7 @@ extension AmazonFreeRTOSManager {
1006
}
1007
1008
private func decode<T: Decborable>(_: T.Type, from data: Data) -> T? {
1009
- if let decoded = CBOR.decode(Array([UInt8](data))) as? NSDictionary {
+ if !data.isEmpty, let decoded = CBOR.decode(Array([UInt8](data))) as? NSDictionary {
1010
return T.toSelf(dictionary: decoded)
1011
1012
return nil
0 commit comments