Fixed erronous clearing of value-fields in tagmappings, (hopefully) fixes #131

This commit is contained in:
Pieter Vander Vennet 2020-09-27 20:51:37 +02:00
parent 6509358f84
commit c53ccb7bae
6 changed files with 20 additions and 7 deletions

View file

@ -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 {

View file

@ -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();
}
}
));