diff options
Diffstat (limited to 'ext/js/display/display-generator.js')
-rw-r--r-- | ext/js/display/display-generator.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 920d2c94..b91d0ce9 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -401,14 +401,19 @@ export class DisplayGenerator { * @returns {?HTMLElement} */ _createTermDefinitionEntry(entry, dictionary) { - if (typeof entry === 'string') { - return this._createTermDefinitionEntryText(entry); - } else if (typeof entry === 'object' && entry !== null) { - switch (entry.type) { - case 'image': - return this._createTermDefinitionEntryImage(entry, dictionary); - case 'structured-content': - return this._createTermDefinitionEntryStructuredContent(entry.content, dictionary); + switch (typeof entry) { + case 'string': + return this._createTermDefinitionEntryText(entry); + case 'object': { + switch (entry.type) { + case 'image': + return this._createTermDefinitionEntryImage(entry, dictionary); + case 'structured-content': + return this._createTermDefinitionEntryStructuredContent(entry.content, dictionary); + case 'text': + break; + } + break; } } |