Minor fix in style path handling (allow absolute paths)
This commit is contained in:
parent
f6580c0342
commit
8ea665297f
2 changed files with 2 additions and 2 deletions
|
@ -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));
|
styleJSON = clone(require(styleJSONPath));
|
||||||
|
|
||||||
var httpTester = /^(http(s)?:)?\/\//;
|
var httpTester = /^(http(s)?:)?\/\//;
|
||||||
|
|
|
@ -10,7 +10,7 @@ var clone = require('clone'),
|
||||||
module.exports = function(options, repo, params, id, reportTiles, reportFont) {
|
module.exports = function(options, repo, params, id, reportTiles, reportFont) {
|
||||||
var app = express().disable('x-powered-by');
|
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));
|
var styleJSON = clone(require(styleFile));
|
||||||
Object.keys(styleJSON.sources).forEach(function(name) {
|
Object.keys(styleJSON.sources).forEach(function(name) {
|
||||||
|
|
Loading…
Reference in a new issue