diff --git a/src/commands/project/delete/source.ts b/src/commands/project/delete/source.ts index a90bc092..dc99f7a4 100644 --- a/src/commands/project/delete/source.ts +++ b/src/commands/project/delete/source.ts @@ -214,14 +214,14 @@ export class Source extends SfCommand { this.components .filter((comp) => comp.type.strategies?.adapter === 'bundle') .filter(isSourceComponent) - .map((bundle: SourceComponent) => { + .flatMap((bundle: SourceComponent) => sourcepaths.map((sourcepath) => // walkContent returns absolute paths while sourcepath will usually be relative bundle.walkContent().some((content) => content.endsWith(sourcepath)) ? this.moveBundleToManifest(bundle, sourcepath) - : undefined - ); - }) + : [] + ) + ) ); }