Skip to content

Commit 518ee1e

Browse files
[phonegap-build#245] partially
1 parent 63d9e4f commit 518ee1e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ios/PushPlugin.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,11 @@ - (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command {
219219
}
220220
-(void)successWithMessage:(NSString *)message
221221
{
222-
CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
223-
224-
[self.commandDelegate sendPluginResult:commandResult callbackId:self.callbackId];
222+
if (self.callbackId != nil)
223+
{
224+
CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
225+
[self.commandDelegate sendPluginResult:commandResult callbackId:self.callbackId];
226+
}
225227
}
226228

227229
-(void)failWithMessage:(NSString *)message withError:(NSError *)error

0 commit comments

Comments
 (0)