From fe095db90d05eb8484245ace2b5463cb63f5640e Mon Sep 17 00:00:00 2001 From: Chris Bianca Date: Fri, 9 Feb 2018 10:23:35 +0000 Subject: [PATCH] [fcm] Another little fix --- lib/modules/messaging/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/messaging/index.js b/lib/modules/messaging/index.js index c2e1718f..7b27249d 100644 --- a/lib/modules/messaging/index.js +++ b/lib/modules/messaging/index.js @@ -141,7 +141,7 @@ export default class Messaging extends ModuleBase { getInitialMessage(): Promise { return getNativeModule(this) .getInitialMessage() - .then(message => new Message(this, message)); + .then(message => (message ? new Message(this, message) : null)); } hasPermission(): Promise {