Skip to content

Commit

Permalink
fix: resource type predicate (#1454)
Browse files Browse the repository at this point in the history
<!-- For Coveo Employees only. Fill this section.

CDX-1534

-->

## Proposed changes

#1453 , I didn't test the suggestion, and it was breaking the code.
Iterating from the OG code + suggestions, here's a nice solution.

## Testing:
 - Reproduced reported issue w/ master and latest release
 - Did not with this change
  • Loading branch information
louis-bompart authored Mar 18, 2024
1 parent 2cbe516 commit caef795
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/cli/core/src/lib/snapshot/snapshotReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ export class SnapshotReporter {
public getAffectedResourceTypes(): ResourceSnapshotType[] {
const isResourceTypeReportAffected = (
report: ResourceSnapshotsReportOperationModel
) =>
Object.values(report).reduce(
(operation, total) => operation + total,
0
) === 0;
) => Object.values(report).some((operation) => operation > 0);
const changedResourcesTypes: ResourceSnapshotType[] = [];
for (const resourceType of Object.keys(this.report.resourceOperations)) {
if (
Expand Down

0 comments on commit caef795

Please sign in to comment.