Skip to content

Commit

Permalink
fix: check for "jpeg" tile format
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Sep 24, 2024
1 parent 7e279da commit 18d194b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export function generateStyle(containerInfo: ContainerInfo, options: ServerOptio
const { tileFormat } = containerInfo.header;
let format: 'avif' | 'jpg' | 'pbf' | 'png' | 'webp';
switch (tileFormat) {
// @ts-expect-error: check for wrong tile format
case 'jpeg': format = 'jpg'; break;
case 'jpg':
case 'avif':
case 'png':
Expand Down Expand Up @@ -42,7 +44,7 @@ export function generateStyle(containerInfo: ContainerInfo, options: ServerOptio
};
try {
if (metadata != null) {

input.vectorLayers = JSON.parse(metadata)?.vector_layers;
}
} catch (_) {
Expand Down

0 comments on commit 18d194b

Please sign in to comment.