Skip to content

Commit cd2eed0

Browse files
nicklockwoodfacebook-github-bot-4
authored andcommitted
RCTGzipData() acceps nil input, but was not marked as returning nullable output
Reviewed By: milend Differential Revision: D2854721 fb-gh-sync-id: 336b3261f1694bcc173f267582561c0314c0cea0
1 parent 581434a commit cd2eed0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

React/Base/RCTUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ RCT_EXTERN double RCTZeroIfNaN(double value);
9797
RCT_EXTERN NSURL *RCTDataURL(NSString *mimeType, NSData *data);
9898

9999
// Gzip functionality - compression level in range 0 - 1 (-1 for default)
100-
RCT_EXTERN NSData *RCTGzipData(NSData *__nullable data, float level);
100+
RCT_EXTERN NSData *__nullable RCTGzipData(NSData *__nullable data, float level);
101101

102102
// Returns the relative path within the main bundle for an absolute URL
103103
// (or nil, if the URL does not specify a path within the main bundle)

React/Base/RCTUtils.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ BOOL RCTIsGzippedData(NSData *__nullable data)
451451
return (data.length >= 2 && bytes[0] == 0x1f && bytes[1] == 0x8b);
452452
}
453453

454-
NSData *RCTGzipData(NSData *__nullable input, float level)
454+
NSData *__nullable RCTGzipData(NSData *__nullable input, float level)
455455
{
456456
if (input.length == 0 || RCTIsGzippedData(input)) {
457457
return input;

0 commit comments

Comments
 (0)