Use arrow functions when it applies
This commit is contained in:
parent
d908ffdbca
commit
183c8291bc
@ -136,7 +136,7 @@ NamedMapsController.prototype.prepareLayerFilterFromPreviewLayers = function (la
|
||||
var previewLayers = template.view.preview_layers;
|
||||
var layerVisibilityFilter = [];
|
||||
|
||||
template.layergroup.layers.forEach(function (layer, index) {
|
||||
template.layergroup.layers.forEach((layer, index) => {
|
||||
if (previewLayers[''+index] !== false && previewLayers[layer.id] !== false) {
|
||||
layerVisibilityFilter.push(''+index);
|
||||
}
|
||||
@ -372,9 +372,7 @@ function templateZoomCenter(view) {
|
||||
|
||||
function templateBounds(view) {
|
||||
if (view.bounds) {
|
||||
var hasAllBounds = ['west', 'south', 'east', 'north'].every(function(prop) {
|
||||
return Number.isFinite(view.bounds[prop]);
|
||||
});
|
||||
var hasAllBounds = ['west', 'south', 'east', 'north'].every(prop => Number.isFinite(view.bounds[prop]));
|
||||
|
||||
if (hasAllBounds) {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user