forked from MapComplete/MapComplete
Fixed erronous clearing of value-fields in tagmappings, (hopefully) fixes #131
This commit is contained in:
parent
6509358f84
commit
c53ccb7bae
6 changed files with 20 additions and 7 deletions
|
@ -48,7 +48,6 @@ export default class SingleSetting<T> {
|
|||
for (const pathPart of path) {
|
||||
let newConfigPart = configPart[pathPart];
|
||||
if (newConfigPart === undefined) {
|
||||
console.warn("Lost the way for path ", path, " - creating entry")
|
||||
if (typeof (pathPart) === "string") {
|
||||
configPart[pathPart] = {};
|
||||
} else {
|
||||
|
|
|
@ -34,12 +34,17 @@ export default class TagRenderingPreview extends UIElement {
|
|||
let es = tagRenderingPanel.GetValue();
|
||||
|
||||
let rendering: UIElement;
|
||||
const self = this;
|
||||
try {
|
||||
rendering =
|
||||
new VariableUiElement(es.map(tagRenderingConfig => {
|
||||
const tr = FromJSON.TagRendering(tagRenderingConfig, "preview")
|
||||
.construct({tags: this.previewTagValue});
|
||||
return tr.Render();
|
||||
try {
|
||||
const tr = FromJSON.TagRendering(tagRenderingConfig, "preview")
|
||||
.construct({tags: self.previewTagValue});
|
||||
return tr.Render();
|
||||
} catch (e) {
|
||||
return new Combine(["Could not show this tagrendering:", e.message]).Render();
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue