chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-08-23 13:13:41 +02:00
parent 18e977db2a
commit 22a7a14880
111 changed files with 25070 additions and 1612 deletions

View file

@ -63,7 +63,9 @@ export class PreferredRasterLayerSelector {
*/
private async updateLayer() {
// What is the ID of the layer we have to (try to) load?
const targetLayerId = (this._queryParameter.data ?? this._preferredBackgroundLayer.data)?.toLowerCase()
const targetLayerId = (
this._queryParameter.data ?? this._preferredBackgroundLayer.data
)?.toLowerCase()
if (targetLayerId === undefined || targetLayerId === "default") {
return
}

View file

@ -14,7 +14,7 @@ export class And extends TagsFilter {
constructor(and: TagsFilter[]) {
super()
this.and = and
if(and.some(p => typeof p === "string")){
if (and.some((p) => typeof p === "string")) {
console.error("Assertion failed: invalid subtags:", and)
throw "Assertion failed: invalid subtags found"
}

View file

@ -234,8 +234,11 @@ export class TagUtils {
return properties
}
static asProperties(tags: TagsFilter | TagsFilter[], baseproperties: Record<string, string>= {}) {
if(Array.isArray(tags)){
static asProperties(
tags: TagsFilter | TagsFilter[],
baseproperties: Record<string, string> = {}
) {
if (Array.isArray(tags)) {
tags = new And(tags)
}
return TagUtils.changeAsProperties(tags.asChange(baseproperties))