Minor fix in style path handling (allow absolute paths)
This commit is contained in:
@@ -166,7 +166,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||
});
|
||||
};
|
||||
|
||||
var styleJSONPath = path.join(options.paths.styles, styleFile);
|
||||
var styleJSONPath = path.resolve(options.paths.styles, styleFile);
|
||||
styleJSON = clone(require(styleJSONPath));
|
||||
|
||||
var httpTester = /^(http(s)?:)?\/\//;
|
||||
|
||||
@@ -10,7 +10,7 @@ var clone = require('clone'),
|
||||
module.exports = function(options, repo, params, id, reportTiles, reportFont) {
|
||||
var app = express().disable('x-powered-by');
|
||||
|
||||
var styleFile = path.join(options.paths.styles, params.style);
|
||||
var styleFile = path.resolve(options.paths.styles, params.style);
|
||||
|
||||
var styleJSON = clone(require(styleFile));
|
||||
Object.keys(styleJSON.sources).forEach(function(name) {
|
||||
|
||||
Reference in New Issue
Block a user