Skip to content

Commit 4102fce

Browse files
dbmrqcaiyue1993
authored andcommitted
Don't force unwrap storedData
1 parent a512066 commit 4102fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IceCream/Classes/CreamAsset.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class CreamAsset: Object {
4040
/// Cuz we only store the path of data, so we can't access data by `data` property
4141
/// So use this method if you want get the data of this object
4242
public func storedData() -> Data? {
43-
return try! Data(contentsOf: filePath)
43+
return try? Data(contentsOf: filePath)
4444
}
4545

4646
public var filePath: URL {

0 commit comments

Comments
 (0)