Skip to content

Commit

Permalink
Resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
akasunil committed Dec 10, 2024
1 parent 6dcc644 commit 4e02add
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/editor/src/components/collab-sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,22 +296,16 @@ export default function CollabSidebar() {
return { resultComments: [], sortedThreads: [] };
}

const updatedResult = result.map( ( item ) => ( {
...item,
reply: [ ...item.reply ].reverse(),
} ) );

const blockCommentIds = getCommentIdsFromBlocks( blocks );
const blockCommentIdMap = new Map(
blockCommentIds.map( ( item ) => [ item.commentID, item ] )
);

const updatedResult = result.map( ( item ) => {
return {
...item,
clientId: blockCommentIdMap.get( item.id )?.clientID,
};
} );
const updatedResult = result.map( ( item ) => ( {
...item,
reply: [ ...item.reply ].reverse(),
clientId: blockCommentIdMap.get( item.id )?.clientID,
} ) );

const threadIdMap = new Map(
updatedResult.map( ( thread ) => [ thread.id, thread ] )
Expand Down

0 comments on commit 4e02add

Please sign in to comment.