Going green: fix type error when no buffersize is defined in mapconfig
This commit is contained in:
parent
e9112da305
commit
3ce38d7081
@ -9,8 +9,13 @@ MapConfigBufferSizeAdapter.prototype.getMapConfig = function (user, requestMapCo
|
||||
return callback(null, requestMapConfig);
|
||||
}
|
||||
|
||||
|
||||
this.formats.forEach(function (format) {
|
||||
if (Number.isFinite(context.templateParams.buffersize[format])) {
|
||||
if (requestMapConfig.buffersize === undefined) {
|
||||
requestMapConfig.buffersize = {};
|
||||
}
|
||||
|
||||
requestMapConfig.buffersize[format] = context.templateParams.buffersize[format];
|
||||
}
|
||||
});
|
||||
|
@ -283,7 +283,7 @@ describe('buffer size per format for named maps', function () {
|
||||
});
|
||||
|
||||
|
||||
describe.only('buffer size per format for named maps w/o placeholders', function () {
|
||||
describe('buffer size per format for named maps w/o placeholders', function () {
|
||||
var testCases = [
|
||||
{
|
||||
desc: 'should get png tile using buffer-size 0 overriden by template params',
|
||||
@ -398,7 +398,8 @@ describe.only('buffer size per format for named maps w/o placeholders', function
|
||||
}
|
||||
},
|
||||
{
|
||||
desc: 'should get png tile using buffer-size 0 overriden by template params with no buffersize in mapconfig',
|
||||
desc: 'should get png tile using buffer-size 0' +
|
||||
' overriden by template params with no buffersize in mapconfig',
|
||||
coords: { z: 7, x: 64, y: 48 },
|
||||
format: 'png',
|
||||
placeholders: {
|
||||
|
Loading…
Reference in New Issue
Block a user