forked from MapComplete/MapComplete
Small fixes
This commit is contained in:
parent
81ba9973e7
commit
0789abf65e
3 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ export default class LayoutConfig {
|
|||
if (json.description === undefined) {
|
||||
throw "Description not defined in " + this.id;
|
||||
}
|
||||
this.units = LayoutConfig.ExtractUnits(json, context);
|
||||
this.units = LayoutConfig.ExtractUnits(json, context) ?? [];
|
||||
this.title = new Translation(json.title, context + ".title");
|
||||
this.description = new Translation(json.description, context + ".description");
|
||||
this.shortDescription = json.shortDescription === undefined ? this.description.FirstSentence() : new Translation(json.shortDescription, context + ".shortdescription");
|
||||
|
|
|
@ -43,7 +43,7 @@ export default class AttributionPanel extends Combine {
|
|||
const links = sorted.map(kv => `<a href="https://openstreetmap.org/user/${kv.name}" target="_blank">${kv.name}</a>`)
|
||||
const contribs = links.join(", ")
|
||||
|
||||
if (hiddenCount == 0) {
|
||||
if (hiddenCount <= 0) {
|
||||
return Translations.t.general.attribution.mapContributionsBy.Subs({
|
||||
contributors: contribs
|
||||
})
|
||||
|
|
|
@ -50,7 +50,7 @@ export default class TagRenderingQuestion extends UIElement {
|
|||
cancelButton?: BaseUIElement
|
||||
) {
|
||||
super(tags);
|
||||
this._applicableUnit = units.filter(unit => unit.isApplicableToKey(configuration.freeform?.key))[0];
|
||||
this._applicableUnit = (units ?? []).filter(unit => unit.isApplicableToKey(configuration.freeform?.key))[0];
|
||||
this._tags = tags;
|
||||
this._configuration = configuration;
|
||||
this._cancelButton = cancelButton;
|
||||
|
|
Loading…
Reference in a new issue