Skip to content

Commit

Permalink
refactor(dotnet-auth):using findIndex instead of using findIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
morhag90 committed Jun 3, 2024
1 parent 3ea2db8 commit 30b7545
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ export function createBuildersServices(
})
);

const swaggerBuilder = builderServicesBlocks.find((builder) =>
builder.toString().includes("AddSwaggerGen")
const swaggerBuilderIndex = builderServicesBlocks.findIndex((b) =>
b.toString().includes("AddSwaggerGen")
);
if (!swaggerBuilder) return;

const swaggerBuilderIndex = builderServicesBlocks.indexOf(swaggerBuilder);
if (swaggerBuilderIndex === -1) return;

builderServicesBlocks[swaggerBuilderIndex] = new CodeBlock({
references: [
Expand Down

0 comments on commit 30b7545

Please sign in to comment.