Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Commit

Permalink
Discard metadata which is not formatted as pairs
Browse files Browse the repository at this point in the history
Fixes #30
  • Loading branch information
kattrali committed Dec 8, 2016
1 parent 2f8abd0 commit 0599eb4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cocoa/BugsnagReactNative.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ + (NSNumberFormatter *)numberFormatter {
if (!targetMetadata)
targetMetadata = [NSMutableDictionary new];
for (NSString *sectionKey in metadata) {
if (![metadata[sectionKey] isKindOfClass:[NSDictionary class]]) {
NSLog(@"Bugsnag: The metadata recorded for key '%@' is not formatted as key/value pairs. Discarding.", sectionKey);
continue;
}

NSMutableDictionary *section = [targetMetadata[sectionKey] mutableCopy];
if (!section)
section = [NSMutableDictionary new];
Expand Down

0 comments on commit 0599eb4

Please sign in to comment.