Open HMarzban opened 2 years ago
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; };
Remove underscore dependency for this function:
TO