Skip to content

Commit

Permalink
Use .find() instead of .filter()[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Nov 27, 2024
1 parent 90c5996 commit 546f6bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugins/build-report/src/xpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export const getXpackPlugin =
(f) => f.includes(name) || (entrypoint.name && f.includes(entrypoint.name)),
)
// Only keep JS files.
.filter((f) => getType(f) === 'js')[0];
.find((f) => getType(f) === 'js');

for (const file of entryFiles) {
const outputFound = reportOutputsIndexed.get(file);
Expand Down

0 comments on commit 546f6bf

Please sign in to comment.