From 3160daa26bdddb85dd9beef39aea9cfe0b38f6a9 Mon Sep 17 00:00:00 2001 From: ehsan shariati Date: Tue, 15 Oct 2024 17:50:34 -0400 Subject: [PATCH] Update Fula.swift --- ios/Fula.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ios/Fula.swift b/ios/Fula.swift index 6c82007..34db920 100644 --- a/ios/Fula.swift +++ b/ios/Fula.swift @@ -1972,7 +1972,11 @@ func replicateInPool(cidArray: [String], account: String, poolID: String, resolv let result: Data do { - result = try fula.replicate(inPool: cidsBytes, account: account, poolID: poolIDInt) + if let replicationResult = try fula.replicate(inPool: cidsBytes, account: account, poolID: poolIDInt) { + result = replicationResult + } else { + throw NSError(domain: "FULAErrorDomain", code: 1007, userInfo: [NSLocalizedDescriptionKey: "Replication result is nil"]) + } } catch { print("Error replicating in pool: \(error)") DispatchQueue.main.async {