Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent insert nil into NSDictionary #73

Merged
merged 1 commit into from
May 23, 2014

Conversation

noahlu
Copy link

@noahlu noahlu commented Mar 12, 2014

Prevent potential crash when sending nil as responseData.

@littlebeat
Copy link

That's what I want!

@yukai44444
Copy link

It's awesome!

@satyso
Copy link

satyso commented Mar 12, 2014

cool

@marcuswestin
Copy link
Owner

Hey guys,

I'm sorry I've been absent on this one.

Would it make more sense to send an NSNull value?

@noahlu
Copy link
Author

noahlu commented May 23, 2014

Yes, of course. there are many scenarios we pass nil in, so I think the BRIDGE should handle this case.

@marcuswestin
Copy link
Owner

Cool, thanks guys, sorry for the delay. I am going to merge the patch and then change the replacement value from @{} to [NSNull null]. This way the javascript will receive a null value instead of {}. Sound good?

marcuswestin added a commit that referenced this pull request May 23, 2014
prevent insert nil into NSDictionary
@marcuswestin marcuswestin merged commit 095f90d into marcuswestin:master May 23, 2014
marcuswestin added a commit that referenced this pull request May 23, 2014
…replace that value with `[NSNull null]` instead of `@{}`. This way the javascript will receive a `null` value instead of `{}`. See gh pr #73
@noahlu
Copy link
Author

noahlu commented May 24, 2014

It's perfect, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants