Browse Source

Be robust against nil transactions in FLEXNetworkTransactionTableViewCell

Ryan Olson 10 years ago
parent
commit
b0b64c1ba9
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Classes/Network/FLEXNetworkTransactionTableViewCell.m

+ 4 - 2
Classes/Network/FLEXNetworkTransactionTableViewCell.m

@@ -127,11 +127,13 @@ NSString *const kFLEXNetworkTransactionCellIdentifier = @"kFLEXNetworkTransactio
     NSMutableArray *detailComponents = [NSMutableArray array];
 
     NSString *timestamp = [[self class] timestampStringFromRequestDate:self.transaction.startTime];
-    [detailComponents addObject:timestamp];
+    if ([timestamp length] > 0) {
+        [detailComponents addObject:timestamp];
+    }
 
     // Omit method for GET (assumed as default)
     NSString *httpMethod = self.transaction.request.HTTPMethod;
-    if (httpMethod) {
+    if ([httpMethod length] > 0) {
         [detailComponents addObject:httpMethod];
     }