@@ -5500,7 +5500,7 @@ var qm = {
5500
5500
getAllUniqueNotifications : function ( ) {
5501
5501
qm . qmLog . info ( "Called getAllUniqueRatingNotifications" ) ;
5502
5502
var notifications = qm . storage . getItem ( qm . items . trackingReminderNotifications ) ;
5503
- if ( ! notifications ) {
5503
+ if ( ! notifications || ! notifications . length ) {
5504
5504
qm . qmLog . info ( "No notifications in storage!" ) ;
5505
5505
return null ;
5506
5506
}
@@ -5545,7 +5545,7 @@ var qm = {
5545
5545
removeNotificationFromSyncQueueAndUnhide : function ( ) {
5546
5546
qm . qmLog . info ( "Called undo notification tracking..." ) ;
5547
5547
var notificationsSyncQueue = qm . storage . getItem ( qm . items . notificationsSyncQueue ) ;
5548
- if ( ! notificationsSyncQueue ) {
5548
+ if ( ! notificationsSyncQueue || ! notificationsSyncQueue . length ) {
5549
5549
return false ;
5550
5550
}
5551
5551
notificationsSyncQueue [ 0 ] . hide = false ;
@@ -7439,7 +7439,7 @@ var qm = {
7439
7439
return userVariable ;
7440
7440
} ,
7441
7441
setTrackingReminderNotifications : function ( notifications ) {
7442
- if ( ! notifications ) {
7442
+ if ( ! notifications || ! notifications . length ) {
7443
7443
qm . qmLog . error ( "No notifications provided to qm.storage.setTrackingReminderNotifications" ) ;
7444
7444
return ;
7445
7445
}
@@ -7712,7 +7712,8 @@ var qm = {
7712
7712
if ( isNaN ( trackingReminderNotificationId ) && body . trackingReminderNotificationId ) {
7713
7713
trackingReminderNotificationId = body . trackingReminderNotificationId ;
7714
7714
}
7715
- if ( qm . storage . getTrackingReminderNotifications ( ) && qm . storage . getTrackingReminderNotifications ( ) . length ) {
7715
+ var notifications = qm . storage . getTrackingReminderNotifications ( ) ;
7716
+ if ( notifications && notifications . length ) {
7716
7717
qm . qmLog . info ( null , 'Deleting notification with id ' + trackingReminderNotificationId , null ) ;
7717
7718
qm . storage . deleteById ( qm . items . trackingReminderNotifications , trackingReminderNotificationId ) ;
7718
7719
} else {
0 commit comments