Commit 4e533e96 by Brent Gulanowski Committed by GitHub

Merge pull request #244 from Shopify/bugfix/cancel-dependent-operations

Execute completion blocks before marking as finished
parents 11622864 d7c36e9f
......@@ -82,14 +82,14 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
- (void)finishWithJSON:(id)JSON response:(NSHTTPURLResponse *)response
{
[self finishExecution];
self.completion(JSON, response, nil);
[self finishExecution];
}
- (void)finishWithError:(NSError *)error response:(NSHTTPURLResponse *)response
{
[self finishExecution];
self.completion(nil, response, error);
[self finishExecution];
}
#pragma mark - Start -
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment