Fix serving the same style twice

This commit is contained in:
Petr Sloup 2016-06-29 20:28:56 +02:00
parent 4eea8a91b8
commit 6100013718
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ module.exports = function(options, repo, params, id) {
}); });
}; };
styleJSON = require(path.join(options.paths.styles, styleFile)); styleJSON = clone(require(path.join(options.paths.styles, styleFile)));
styleJSON.sprite = 'sprites://' + path.basename(styleFile, '.json'); styleJSON.sprite = 'sprites://' + path.basename(styleFile, '.json');
styleJSON.glyphs = 'fonts://{fontstack}/{range}.pbf'; styleJSON.glyphs = 'fonts://{fontstack}/{range}.pbf';

View file

@ -45,7 +45,7 @@ module.exports = function(opts, callback) {
var config; var config;
try { try {
config = require(configPath); config = clone(require(configPath));
} catch (e) { } catch (e) {
console.log('ERROR: Config file not found or invalid!'); console.log('ERROR: Config file not found or invalid!');
console.log(' See README.md for instructions and sample data.'); console.log(' See README.md for instructions and sample data.');