Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return the promise array #865

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/commands/project/delete/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ export class Source extends SfCommand<DeleteSourceJson> {
this.components
.filter((comp) => comp.type.strategies?.adapter === 'bundle')
.filter(isSourceComponent)
.map((bundle: SourceComponent) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the curly bracket here causes the stuff inside to execute, but it should have returned the result.

.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
);
})
: []
Copy link
Contributor Author

@mshanemc mshanemc Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty arrays get removed during flattening

)
)
);
}

Expand Down
Loading