[notifications] Make title and body optional fields

This commit is contained in:
Chris Bianca 2018-04-11 18:15:38 +01:00
parent 548086db7a
commit 0645d179b3
1 changed files with 1 additions and 7 deletions

View File

@ -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 {