Skip to content

Commit

Permalink
cci(danger): fix markAll for finished rows
Browse files Browse the repository at this point in the history
  • Loading branch information
ChlodAlejandro committed Mar 21, 2024
1 parent 5f173f0 commit 16bb53a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/root/DeputyContributionSurveyRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,11 @@ export default class DeputyContributionSurveyRow extends EventTarget implements
* Mark all revisions of this section as finished.
*/
markAllAsFinished(): void {
if ( !this.revisions ) {
// If `renderUnfinished` was never called, this will be undefined.
// We want to skip over instead.
return;
}
this.revisions.forEach( ( revision ) => {
revision.completed = true;
} );
Expand Down

0 comments on commit 16bb53a

Please sign in to comment.