Skip to content

Commit

Permalink
fixing duplicate annotation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mbogo-mit committed Nov 24, 2023
1 parent bcf6b81 commit c9eea69
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/DashboardChannels/AnnotationsChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,13 @@ export default function AnnotationsChannel({
}
}

annotations[slug].page = page;
annotations[slug].mine.push(...mine);
annotations[slug].shared.push(...shared);
annotations[slug]['shared-with-me'].push(...sharedWithMe);
if (annotations[slug].page !== page) {
annotations[slug].page = page;
annotations[slug].mine.push(...mine);
annotations[slug].shared.push(...shared);
annotations[slug]['shared-with-me'].push(...sharedWithMe);
}

} else {
annotations[slug] = {
countByPermissions,
Expand Down

0 comments on commit c9eea69

Please sign in to comment.