Skip to content

Commit

Permalink
Merge pull request #73 from noahlu/master
Browse files Browse the repository at this point in the history
prevent insert nil into NSDictionary
  • Loading branch information
marcuswestin committed May 23, 2014
2 parents 6da9284 + 1dc0273 commit 095f90d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WebViewJavascriptBridge/WebViewJavascriptBridge.m
Expand Up @@ -174,6 +174,10 @@ - (void)_flushMessageQueue {
NSString* callbackId = message[@"callbackId"];
if (callbackId) {
responseCallback = ^(id responseData) {
if (responseData == nil) {
responseData = @{};
}

WVJBMessage* msg = @{ @"responseId":callbackId, @"responseData":responseData };
[self _queueMessage:msg];
};
Expand Down

0 comments on commit 095f90d

Please sign in to comment.