[notifications] Make title and body optional fields
This commit is contained in:
parent
548086db7a
commit
0645d179b3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue