MR comments and updates not displayed due to JS error

Created on 21 March 2024, 3 months ago
Updated 11 April 2024, 3 months ago

Problem/Motivation

https://www.drupal.org/project/globallink/issues/3344157 ๐Ÿ“Œ Fix the issues reported by phpcs Needs review and inspect console. There is a JS error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'mergeActivity')

Proposed resolution

The current code is

const afterComment = comments.get(commentTimes.find(e => e < createdAt.getTime()));
if (afterComment.mergeActivity === undefined) {

But we could better check if an object has a property (see https://stackoverflow.com/questions/11040472/how-to-check-if-object-prop...).

Remaining tasks

MR

๐Ÿ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain fjgarlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024