chore: automated housekeeping...
This commit is contained in:
parent
a8fd550b72
commit
6a0b77eb99
180 changed files with 16812 additions and 2509 deletions
|
@ -160,7 +160,7 @@ export default class Constants {
|
|||
"teardrop",
|
||||
"teardrop_with_hole_green",
|
||||
"triangle",
|
||||
"wifi"
|
||||
"wifi",
|
||||
] as const
|
||||
public static readonly defaultPinIcons: string[] = <any>Constants._defaultPinIcons
|
||||
/**
|
||||
|
|
|
@ -1096,7 +1096,10 @@ class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
|
|||
continue
|
||||
}
|
||||
|
||||
if(txt.indexOf(json.freeform.key) >= 0 && txt.indexOf("{"+json.freeform.key+"}") < 0){
|
||||
if (
|
||||
txt.indexOf(json.freeform.key) >= 0 &&
|
||||
txt.indexOf("{" + json.freeform.key + "}") < 0
|
||||
) {
|
||||
context
|
||||
.enter("render")
|
||||
.err(
|
||||
|
@ -1105,7 +1108,6 @@ class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
|
|||
continue
|
||||
}
|
||||
|
||||
|
||||
context
|
||||
.enter("render")
|
||||
.err(
|
||||
|
|
|
@ -366,18 +366,16 @@ export default class TagRenderingConfig {
|
|||
throw `${ctx}: Invalid mapping: "if" is defined as an array. Use {"and": <your conditions>} or {"or": <your conditions>} instead`
|
||||
}
|
||||
|
||||
if(mapping.addExtraTags !== undefined && !Array.isArray(mapping.addExtraTags)){
|
||||
if (mapping.addExtraTags !== undefined && !Array.isArray(mapping.addExtraTags)) {
|
||||
throw `${ctx}.addExtraTags: expected a list, but got a ${typeof mapping.addExtraTags}`
|
||||
|
||||
}
|
||||
if (mapping.addExtraTags !== undefined && multiAnswer) {
|
||||
const usedKeys = mapping.addExtraTags?.flatMap(et => TagUtils.Tag(et).usedKeys())
|
||||
if(usedKeys.some(key => TagUtils.Tag(mapping.if).usedKeys().indexOf(key ) > 0)){
|
||||
const usedKeys = mapping.addExtraTags?.flatMap((et) => TagUtils.Tag(et).usedKeys())
|
||||
if (usedKeys.some((key) => TagUtils.Tag(mapping.if).usedKeys().indexOf(key) > 0)) {
|
||||
throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags which also modifies one of the keys; this is not allowed`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let hideInAnswer: boolean | TagsFilter = false
|
||||
if (typeof mapping.hideInAnswer === "boolean") {
|
||||
hideInAnswer = mapping.hideInAnswer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue