diff --git a/src/js/core/textual_game_state.tsx b/src/js/core/textual_game_state.tsx index 7462769e..8cc2a0d7 100644 --- a/src/js/core/textual_game_state.tsx +++ b/src/js/core/textual_game_state.tsx @@ -19,7 +19,11 @@ export abstract class TextualGameState extends GameState { * @deprecated */ getInnerHTML(): string { - return ""; + return ` +
+ ${this.getMainContentHTML()} +
+ `; } /** @@ -36,21 +40,8 @@ export abstract class TextualGameState extends GameState { * title, and content returned by {@link getInitialContent}. */ protected override getContentLayout(): Node { - let content = this.getInitialContent(); - - if (content === null) { - // Fall back either to getMainContentHTML or getInnerHTML (if not "") - let html = this.getInnerHTML(); - if (html === "") { - html = ` -
- ${this.getMainContentHTML()} -
- `; - } - - content = super.getContentLayout(); - } + const initialContent = this.getInitialContent(); + const content = initialContent !== null &&
{initialContent}
; return ( <> @@ -60,7 +51,7 @@ export abstract class TextualGameState extends GameState { {this.getStateHeaderTitle() ?? ""} -
{content}
+
{content || super.getContentLayout()}
); }