scaffolder-backend: fix review nit
This commit is contained in:
@@ -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}"`);
|
||||
}
|
||||
|
||||
@@ -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}"`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user