Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

resolving eslint issues

bsatarnejad597775498b05
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts
index bee373fe534..5c505fe97eb 100644
--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts
+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts
@@ -142,18 +142,19 @@ export class ActivityPanelBaseController extends UntilDestroyedMixin implements
return !!this.notifications.find((notification) => notification._links.activity?.href === activityHref);
}
- protected scrollToUnreadNotification() {
+ protected scrollToUnreadNotification():void {
// scroll to the unread notification only if there is no deep link
- if (!(window.location.href.indexOf("activity#") > -1)) {
- let unreadNotifications = document.querySelectorAll('[data-qa-selector="user-activity-bubble"]');
- let notificationsLength = unreadNotifications.length;
- if (this.reverse) {
- unreadNotifications[notificationsLength - 1].setAttribute("style", "scroll-margin-top: 200px;");
- unreadNotifications[notificationsLength - 1].scrollIntoView();
- }
- else {
- unreadNotifications[0].setAttribute("style", "scroll-margin-top: 200px;");
- unreadNotifications[0].scrollIntoView();
+ if (!(window.location.href.indexOf('activity#') > -1)) {
+ const unreadNotifications = document.querySelectorAll('[data-qa-selector="user-activity-bubble"]');
+ const unreadNotificationsLength = unreadNotifications?.length;
+ if (unreadNotificationsLength) {
+ if (this.reverse) {
+ unreadNotifications[unreadNotificationsLength - 1].setAttribute('style', 'scroll-margin-top: 200px;');
+ unreadNotifications[unreadNotificationsLength - 1].scrollIntoView();
+ } else {
+ unreadNotifications[0].setAttribute('style', 'scroll-margin-top: 200px;');
+ unreadNotifications[0].scrollIntoView();
+ }
}
}
}