Skip to content

Commit

Permalink
Aborted change
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Sekachev committed Mar 2, 2021
1 parent b46852a commit 3c4c0fe
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions cvat-ui/src/reducers/review-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default function (state: ReviewState = defaultState, action: any): Review
}
case ReviewActionTypes.START_ISSUE: {
const { position } = action.payload;

return {
...state,
newIssuePosition: position,
Expand All @@ -109,19 +108,19 @@ export default function (state: ReviewState = defaultState, action: any): Review

return {
...state,
latestComments: state.latestComments.includes(issue.comments[0].message)
? state.latestComments
: Array.from(
new Set(
[...state.latestComments, issue.comments[0].message].filter(
(message: string): boolean =>
![
consts.QUICK_ISSUE_INCORRECT_POSITION_TEXT,
consts.QUICK_ISSUE_INCORRECT_ATTRIBUTE_TEXT,
].includes(message),
),
),
).slice(-consts.LATEST_COMMENTS_SHOWN_QUICK_ISSUE),
latestComments: state.latestComments.includes(issue.comments[0].message) ?
state.latestComments :
Array.from(
new Set(
[...state.latestComments, issue.comments[0].message].filter(
(message: string): boolean =>
![
consts.QUICK_ISSUE_INCORRECT_POSITION_TEXT,
consts.QUICK_ISSUE_INCORRECT_ATTRIBUTE_TEXT,
].includes(message),
),
),
).slice(-consts.LATEST_COMMENTS_SHOWN_QUICK_ISSUE),
frameIssues,
newIssuePosition: null,
};
Expand Down

0 comments on commit 3c4c0fe

Please sign in to comment.