From 66c105849a784909744acc9916e6b2dd943505b0 Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 2 Aug 2019 19:36:08 +0100 Subject: [PATCH] Fix for alreadySyncing --- SyncKit/Classes/QSSynchronizer/CloudKitSynchronizer.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SyncKit/Classes/QSSynchronizer/CloudKitSynchronizer.swift b/SyncKit/Classes/QSSynchronizer/CloudKitSynchronizer.swift index 5c8f5350..f7b56307 100644 --- a/SyncKit/Classes/QSSynchronizer/CloudKitSynchronizer.swift +++ b/SyncKit/Classes/QSSynchronizer/CloudKitSynchronizer.swift @@ -145,8 +145,9 @@ public class CloudKitSynchronizer: NSObject { @objc public func synchronize(completion: ((Error?) -> ())?) { - if syncing { + guard !syncing else { completion?(SyncError.alreadySyncing) + return } debugPrint("CloudKitSynchronizer >> Initiating synchronization")