Skip to content

Commit

Permalink
refactor: remove duplicated check
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Jun 22, 2023
1 parent 4f5bc1f commit 4070a16
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/lambda-tiler/src/routes/tile.xyz.raster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,6 @@ export const TileXyzRaster = {

const background = tileSet.background ?? DefaultBackground;

// If no layers are used and the tile is going to be transparent
// return 204 no content instead of a empty image
if (layers.length === 0 && background.alpha === 0) {
const response = NoContent();
response.header(HttpHeader.ETag, cacheKey);
response.header(HttpHeader.CacheControl, 'public, max-age=604800, stale-while-revalidate=86400');
return response;
}

const res = await TileComposer.compose({
layers,
format: xyz.tileType,
Expand Down

0 comments on commit 4070a16

Please sign in to comment.