Skip to content

Commit

Permalink
WEBUI-1097: fix activity tab showing unwanted activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishant0928 committed Mar 14, 2024
1 parent edf3951 commit c72aa52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions elements/nuxeo-document-activity/nuxeo-document-activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ Polymer({
_areGatherableActivities(a, b) {
let delta = new Date(a.eventDate) - new Date(b.eventDate);
delta = delta / 1000 / 60 / 60; // Converts ms to hours
// if (!a || !a.eventId || !a.extended || !b || !b.eventId || !b.extended) {
// return;
// }
if (a.eventId === 'download' && !a.extended.clientReason) {
a.extended.clientReason = 'download';
}
if (b.eventId === 'download' && !b.extended.clientReason) {
b.extended.clientReason = 'download';
}
return !!(
a.extended &&
a.extended.clientReason &&
Expand Down

0 comments on commit c72aa52

Please sign in to comment.