Skip to content

prevent insert nil into NSDictionary#73

Merged
marcuswestin merged 1 commit into
marcuswestin:masterfrom
noahlu:master
May 23, 2014
Merged

prevent insert nil into NSDictionary#73
marcuswestin merged 1 commit into
marcuswestin:masterfrom
noahlu:master

Conversation

@noahlu

@noahlu noahlu commented Mar 12, 2014

Copy link
Copy Markdown

Prevent potential crash when sending nil as responseData.

@littlebeat

Copy link
Copy Markdown

That's what I want!

@yukai44444

Copy link
Copy Markdown

It's awesome!

@satyso

satyso commented Mar 12, 2014

Copy link
Copy Markdown

cool

@marcuswestin

Copy link
Copy Markdown
Owner

Hey guys,

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

Would it make more sense to send an NSNull value?

@noahlu

noahlu commented May 23, 2014

Copy link
Copy Markdown
Author

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

@marcuswestin

Copy link
Copy Markdown
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

noahlu commented May 24, 2014

Copy link
Copy Markdown
Author

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