Skip to content

Commit 3160daa

Browse files
committed
Update Fula.swift
1 parent b8945fa commit 3160daa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ios/Fula.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,11 @@ func replicateInPool(cidArray: [String], account: String, poolID: String, resolv
19721972

19731973
let result: Data
19741974
do {
1975-
result = try fula.replicate(inPool: cidsBytes, account: account, poolID: poolIDInt)
1975+
if let replicationResult = try fula.replicate(inPool: cidsBytes, account: account, poolID: poolIDInt) {
1976+
result = replicationResult
1977+
} else {
1978+
throw NSError(domain: "FULAErrorDomain", code: 1007, userInfo: [NSLocalizedDescriptionKey: "Replication result is nil"])
1979+
}
19761980
} catch {
19771981
print("Error replicating in pool: \(error)")
19781982
DispatchQueue.main.async {

0 commit comments

Comments
 (0)