From 0645d179b3dec2288480d141e7a302ef1be2bb6d Mon Sep 17 00:00:00 2001 From: Chris Bianca Date: Wed, 11 Apr 2018 18:15:38 +0100 Subject: [PATCH] [notifications] Make title and body optional fields --- lib/modules/notifications/Notification.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/modules/notifications/Notification.js b/lib/modules/notifications/Notification.js index 9385c27e..f357454e 100644 --- a/lib/modules/notifications/Notification.js +++ b/lib/modules/notifications/Notification.js @@ -143,16 +143,10 @@ export default class Notification { } build(): NativeNotification { - // Android required fields: body, title, smallicon - // iOS required fields: TODO - if (!this._body) { - throw new Error('Notification: Missing required `body` property'); - } else if (!this._notificationId) { + if (!this._notificationId) { throw new Error( 'Notification: Missing required `notificationId` property' ); - } else if (!this._title) { - throw new Error('Notification: Missing required `title` property'); } return {