diff --git a/lib/delivery-locations-resolver.js b/lib/delivery-locations-resolver.js index a4bd279a..60539bbb 100644 --- a/lib/delivery-locations-resolver.js +++ b/lib/delivery-locations-resolver.js @@ -240,6 +240,9 @@ class DeliveryLocationsResolver { const nyplItem = isItemNyplOwned(item) if (!hasRecapCustomerCode) { const requestableBasedOnHoldingLocation = nyplItem ? this.requestableBasedOnHoldingLocation(item) : true + // the length of the list of delivery locations is checked later to determine physical requestability + // In case of an offsite item with no recap customer code, we want this to be based on holding location + // so we put a placeholder '' in case it is requestable based on holding location deliveryLocation = requestableBasedOnHoldingLocation ? [''] : [] eddRequestable = requestableBasedOnHoldingLocation } else if (!nyplItem || this.requestableBasedOnHoldingLocation(item)) { diff --git a/test/delivery-locations-resolver.test.js b/test/delivery-locations-resolver.test.js index e82c434a..dca24d2c 100644 --- a/test/delivery-locations-resolver.test.js +++ b/test/delivery-locations-resolver.test.js @@ -512,7 +512,7 @@ describe('Delivery-locations-resolver', function () { expect(resolved.eddRequestable).to.equal(false) }) - it('returns empty deliveryLocation and eddRequestable true based on holding location when missing recapCustomerCode', function () { + it('returns empty string delivery location and eddRequestable true based on holding location when missing recapCustomerCode', function () { const resolved = DeliveryLocationsResolver.getRecapDeliveryInfo({ holdingLocation: [{ id: 'loc:rcpm2' }], uri: 'i14747243'