Commits

Anders Carlsson committed b60a36f

Fix so `start` works when there is no cached result.

Comments (0)

Files changed (1)

NSURLConnectionVCR/NSURLConnectionVCR.m

 }
 
 - (void)start {
-  [self sendVCRCachedResultFor:delegate.request to:delegate.realDelegate];
+  VCRCache* cache = [VCRCache loadCacheForRequest:delegate.request];
+  if (cache) {
+    [self sendVCRCachedResultFor:delegate.request to:delegate.realDelegate];
+  } else {
+    [connection start];
+  }
 }
 
 @end