Open
Description
Remove underscore dependency for this function:
EpComments.prototype.buildComments = function (commentsData) {
const comments =
_.map(commentsData, (commentData, commentId) => this.buildComment(commentId, commentData.data));
return comments;
};
TO
EpComments.prototype.buildComments = function (commentsData) {
const comments = [];
for (const commentId in commentsData) {
if (!Object.hasOwn(commentsData, commentId)) {
const newComment = this.buildComment(commentId, commentData.data);
comments.push(newComment)
}
}
return comments;
};
Metadata
Assignees
Labels
No labels