Fix image carousel bug

This commit is contained in:
Pieter Vander Vennet 2020-11-02 18:59:21 +01:00
parent c226e15d99
commit a19f3e61f9
7 changed files with 43 additions and 58 deletions

View file

@ -22,7 +22,6 @@ export class SubstitutedTranslation extends UIElement {
this.translation = translation;
this.tags = tags;
const self = this;
this.dumbMode = false;
Locale.language.addCallbackAndRun(() => {
self.content = self.CreateContent();
self.Update();
@ -33,7 +32,7 @@ export class SubstitutedTranslation extends UIElement {
InnerRender(): string {
return new Combine(this.content).Render();
}
private CreateContent(): UIElement[] {
let txt = this.translation?.txt;
if (txt === undefined) {
@ -78,7 +77,7 @@ export class SubstitutedTranslation extends UIElement {
return [...partBefore, element, ...partAfter]
} catch (e) {
console.error(e);
return [...partBefore, ...partAfter]
return [...partBefore,new FixedUiElement(`Failed loading ${knownSpecial.funcName}(${matched[2]}): ${e}`) , ...partAfter]
}
}
}