Commit 11622864 by Brent Gulanowski Committed by GitHub

Merge pull request #243 from Shopify/bugfix/continue-web-checkout

Improve consistency check when starting checkout
parents 74858565 09e6dcaa
...@@ -108,7 +108,7 @@ static NSString *const WebCheckoutCustomerAccessToken = @"customer_access_token" ...@@ -108,7 +108,7 @@ static NSString *const WebCheckoutCustomerAccessToken = @"customer_access_token"
- (void)startCheckout:(BUYCheckout *)checkout - (void)startCheckout:(BUYCheckout *)checkout
{ {
if (self.isInProgress) { if (self.isInProgress && ![checkout.token isEqual:self.checkout.token]) {
[[NSException exceptionWithName:NSInternalInconsistencyException reason:[NSString stringWithFormat:@"Asked to start checkout; but checkout has already started in %@", self] userInfo:nil] raise]; [[NSException exceptionWithName:NSInternalInconsistencyException reason:[NSString stringWithFormat:@"Asked to start checkout; but checkout has already started in %@", self] userInfo:nil] raise];
} }
......
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