diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.ts b/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.ts index 59537e73f4..226f7e3836 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.ts @@ -46,9 +46,9 @@ export class Preparers implements PreparerBuilder { if (!preparer) { if ((protocol as string) === 'url') { const type = this.typeDetector?.(location); - const preparer2 = type && this.preparerMap.get(type as RemoteProtocol); - if (preparer2) { - return preparer2; + const detected = type && this.preparerMap.get(type as RemoteProtocol); + if (detected) { + return detected; } throw new Error(`No preparer integration found for url "${location}"`); } diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/publishers.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/publishers.ts index 23f15745ba..db383aaf7f 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/publishers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/publishers.ts @@ -47,10 +47,9 @@ export class Publishers implements PublisherBuilder { if (!publisher) { if ((protocol as string) === 'url') { const type = this.typeDetector?.(location); - const publisher2 = - type && this.publisherMap.get(type as RemoteProtocol); - if (publisher2) { - return publisher2; + const detected = type && this.publisherMap.get(type as RemoteProtocol); + if (detected) { + return detected; } throw new Error(`No preparer integration found for url "${location}"`); }