File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/ROOT/partials/plugin-apis Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,12 @@ console.log(comments.getEventLog(
131131
132132const eventLog = comments.getEventLog();
133133const events = eventLog.events;
134- const mentionedUsers = events.flatMap(({ mentionedUids }) => mentionedUids);
134+ const mentionedUsers = events.flatMap(({ mentionedUids }) => mentionedUids || []);
135+ console.log(mentionedUsers);
135136
136137let whoMentionedWho = {};
137138events.forEach((event) => {
138- if (event.type === "create" || event.type === "reply") {
139+ if (( event.type === "create" || event.type === "reply") && event.mentionedUids !== undefined ) {
139140 console.log(event);
140141 if (whoMentionedWho[event.conversationAuthor.author] === undefined) {
141142 whoMentionedWho[event.conversationAuthor.author] = event.mentionedUids;
You can’t perform that action at this time.
0 commit comments