From 0e8530b5fc835f6676c9e192712425383631c0cf Mon Sep 17 00:00:00 2001 From: Marek Calus Date: Thu, 22 Oct 2020 11:30:44 +0200 Subject: [PATCH] Fix type error --- plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts b/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts index 8da65dbd85..b1f4e40524 100644 --- a/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts +++ b/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts @@ -79,7 +79,7 @@ export class HigherOrderOperations implements HigherOrderOperation { // Read the location fully, bailing on any errors const readerOutput = await this.locationReader.read(spec); - if (!spec.pendingLocation && readerOutput.errors.length) { + if (!(spec.presence === 'optional') && readerOutput.errors.length) { const item = readerOutput.errors[0]; throw new InputError( `Failed to read location ${item.location.type}:${item.location.target}, ${item.error}`,