Skip to content

Conversation

@darvin
Copy link

@darvin darvin commented Sep 14, 2015

It could crash if string is empty

@lukeredpath lukeredpath modified the milestone: v1.6.2 Sep 29, 2015
@darvin
Copy link
Author

darvin commented Mar 17, 2016

Any luck in reviewing it?

@hamchapman
Copy link
Contributor

@lukeredpath is this good to be merged?

// try and deserialize the data as JSON if possible
if ([data respondsToSelector:@selector(dataUsingEncoding:)]) {
if ([data respondsToSelector:@selector(dataUsingEncoding:)] &&
!([data isKindOfClass:[NSString class]] && [data isEqualToString:@""]) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this just check isEqual and skip the class check for NSString?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants