Better handling of metatags, more robust error handling when calculating tags

This commit is contained in:
Pieter Vander Vennet 2021-05-10 23:51:03 +02:00
parent 69363fbf0f
commit 6ac8a5373c
10 changed files with 134 additions and 89 deletions

View file

@ -53,7 +53,9 @@ export default class EditableTagRendering extends UIElement {
return this._question.Render();
}
if(!this._configuration.IsKnown(this._tags.data)){
return ""
// Even though it is not known, we hide the question here
// It is the questionbox's task to show the question in edit mode
return "";
}
return new Combine([this._answer,

View file

@ -3,7 +3,6 @@ import {UIEventSource} from "../../Logic/UIEventSource";
import TagRenderingConfig from "../../Customizations/JSON/TagRenderingConfig";
import TagRenderingQuestion from "./TagRenderingQuestion";
import Translations from "../i18n/Translations";
import {TagUtils} from "../../Logic/TagUtils";
/**
@ -44,6 +43,7 @@ export default class QuestionBox extends UIElement {
.onClick(() => {
self._skippedQuestions.setData([]);
})
this.SetClass("block")
}
InnerRender(): string {
@ -57,7 +57,6 @@ export default class QuestionBox extends UIElement {
if (this._skippedQuestions.data.indexOf(i) >= 0) {
continue;
}
// this value is NOT known
return this._tagRenderingQuestions[i].Render();
}