Skip to content

Commit

Permalink
Merge branch 'david/fixAddingStylesTwice' into david/reloadMbtiles
Browse files Browse the repository at this point in the history
Signed-off-by: David Weber | geOps <[email protected]>
  • Loading branch information
candux committed Jan 1, 2024
2 parents b3860f0 + ce9eedf commit 07d1796
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,21 +378,6 @@ function start(opts) {
}

if (options.serveAllStyles) {
fs.readdir(options.paths.styles, { withFileTypes: true }, (err, files) => {
if (err) {
return;
}
for (const file of files) {
if (file.isFile() && path.extname(file.name).toLowerCase() == '.json') {
const id = path.basename(file.name, '.json');
const item = {
style: file.name,
};
addStyle(id, item, !options.serveAllData, false);
}
}
});

const watcher = chokidar.watch(
path.join(options.paths.styles, '*.json'),
{},
Expand Down

0 comments on commit 07d1796

Please sign in to comment.