Fix various bugs

This commit is contained in:
Pieter Vander Vennet 2022-02-22 14:13:41 +01:00
parent 30f4be183e
commit 5284f198d8
26 changed files with 339 additions and 119 deletions

View file

@ -75,7 +75,7 @@ export default class FeaturePipeline {
this.state = state;
const self = this
const expiryInSeconds = Math.min(...state.layoutToUse.layers.map(l => l.maxAgeOfCache))
const expiryInSeconds = Math.min(...state.layoutToUse?.layers?.map(l => l.maxAgeOfCache) ?? [])
this.oldestAllowedDate = new Date(new Date().getTime() - expiryInSeconds);
this.osmSourceZoomLevel = state.osmApiTileSize.data;
const useOsmApi = state.locationControl.map(l => l.zoom > (state.overpassMaxZoom.data ?? 12))