Browse files

Change the && to || so that if the receiver is not the default or roo…

…tSaving contexts, the completion handler will still be run.

Also added a return; on the initial IF statement so that the completion handler does not get run twice as would be the case if the context was the MR_defaultContext.
  • Loading branch information...
1 parent 777cbc3 commit 9164aadc67d912c03c16e95c5d608f1cc1f2cc6b @ChronicStim committed Jul 9, 2012
@@ -104,9 +104,10 @@ - (void) MR_saveInBackgroundErrorHandler:(void (^)(NSError *))errorCallback comp
if (self == [[self class] MR_defaultContext])
[[[self class] MR_rootSavingContext] MR_saveInBackgroundErrorHandler:errorCallback completion:completion];
+ return;
- if (completion && self == [[self class] MR_rootSavingContext])
+ if (completion || self == [[self class] MR_rootSavingContext])
dispatch_async(dispatch_get_main_queue(), completion);

0 comments on commit 9164aad

Please sign in to comment.