File tree Expand file tree Collapse file tree 3 files changed +1
-11
lines changed Expand file tree Collapse file tree 3 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -195,11 +195,6 @@ function buildCustomNotification(_) {
195
195
function buildNotification ( notificationData ) {
196
196
let notification ;
197
197
198
- if ( ! notificationData ) {
199
- LOG . _warn && LOG . warn ( messages . NO_OBJECT_FOR_NOTIFY ) ;
200
- return ;
201
- }
202
-
203
198
if ( Object . keys ( notificationData ) . length === 0 ) {
204
199
LOG . _warn && LOG . warn ( messages . EMPTY_OBJECT_FOR_NOTIFY ) ;
205
200
return ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class NotificationService extends cds.Service {
10
10
* @param {object } message - The message object
11
11
*/
12
12
emit ( event , message ) {
13
- if ( ! event ) {
13
+ if ( ! event ) {
14
14
LOG . _warn && LOG . warn ( messages . NO_OBJECT_FOR_NOTIFY ) ;
15
15
return ;
16
16
}
Original file line number Diff line number Diff line change @@ -553,11 +553,6 @@ describe("Test utils", () => {
553
553
// ).toBeFalsy();
554
554
// });
555
555
556
- test ( "When no notification data for custom notification is passed to buildNotification" , ( ) => {
557
- expect ( buildNotification ( undefined ) ) . toBeFalsy ( ) ;
558
- expect ( buildNotification ( null ) ) . toBeFalsy ( ) ;
559
- } ) ;
560
-
561
556
test ( "Given invalid NTypes | When validateNotificationTypes is called | Then false is returned" , ( ) => {
562
557
expect ( validateNotificationTypes ( [ { NotificationTypeKey : "Test" } , { blabla : "Test2" } ] ) ) . toEqual ( false ) ;
563
558
} ) ;
You can’t perform that action at this time.
0 commit comments