Skip to content

Commit

Permalink
fix: limit special label handling to original (non-preset)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Aug 9, 2024
1 parent 3c5276b commit e13297c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sourceTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,14 @@ export class SourceTracking extends AsyncCreatable {
)
);

// original CustomLabels behavior
const nonDecomposedLabels = this.registry.getTypeByName('customlabel').strategies?.transformer === 'nonDecomposed';

const filenames = Array.from(sourceComponentByFileName.keys());
// delete the files
await Promise.all(
filenames.map((filename) =>
sourceComponentByFileName.get(filename)?.type.id === 'customlabel'
sourceComponentByFileName.get(filename)?.type.id === 'customlabel' && nonDecomposedLabels
? deleteCustomLabels(filename, changesToDelete.filter(sourceComponentIsCustomLabel))
: fs.promises.unlink(filename)
)
Expand Down

0 comments on commit e13297c

Please sign in to comment.