diff --git a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts index 11a9901cb5ea..2a911b4e6cfe 100644 --- a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts +++ b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts @@ -421,8 +421,7 @@ export function getBeaconBlockApi({ return { executionOptimistic, - // Return all sidecars if no indices are specified, only the requested ones (identified by `indices`) otherwise - data: indices.length == 0 ? blobSidecars : blobSidecars.filter(({index}) => indices.includes(index)), + data: indices ? blobSidecars.filter(({index}) => indices.includes(index)) : blobSidecars, }; }, };