Skip to content

Commit

Permalink
be case-insensitive when checking file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
achou11 committed Mar 12, 2024
1 parent ac21cf6 commit be88383
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/fastify-plugins/maps/offline-fallback-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ async function offlineFallbackMapPlugin(fastify, opts) {

if (file.name === 'style.json') continue

// Only work with json or geojson files
const extension = path.extname(file.name)
const extension = path.extname(file.name).toLowerCase()
if (!(extension === '.json' || extension === '.geojson')) continue

const sourceName = path.basename(file.name, extension) + '-source'
Expand Down

0 comments on commit be88383

Please sign in to comment.