| Index: ios/web/web_state/ui/crw_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
|
| index 2dc4d955b92c5ef8a0e0bcdfe4b00db2c8204e27..4b1e6cbe77b0871fed6141881059cf73c84bc29c 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -2821,8 +2821,11 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
| }
|
|
|
| if ([[request HTTPMethod] isEqualToString:@"POST"]) {
|
| - [self cachePOSTDataForRequest:request
|
| - inSessionEntry:[self currentSessionEntry]];
|
| + CRWSessionEntry* currentEntry = [self currentSessionEntry];
|
| + // TODO(crbug.com/570699): Remove this check once it's no longer possible to
|
| + // have no current entries.
|
| + if (currentEntry)
|
| + [self cachePOSTDataForRequest:request inSessionEntry:currentEntry];
|
| }
|
|
|
| return YES;
|
|
|