summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/display-generator.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js
index 8eb699e0..63e7a8b5 100644
--- a/ext/mixed/js/display-generator.js
+++ b/ext/mixed/js/display-generator.js
@@ -63,11 +63,13 @@ class DisplayGenerator {
const definitionsContainer = node.querySelector('.term-definition-list');
const debugInfoContainer = node.querySelector('.debug-info');
- const multiExpression = Array.isArray(details.expressions);
- const multiDefinition = Array.isArray(details.definitions);
+ const expressionMulti = Array.isArray(details.expressions);
+ const definitionMulti = Array.isArray(details.definitions);
- node.dataset.multiExpression = `${multiExpression}`;
- node.dataset.multiDefinition = `${multiDefinition}`;
+ node.dataset.expressionMulti = `${expressionMulti}`;
+ node.dataset.definitionMulti = `${definitionMulti}`;
+ node.dataset.expressionCount = `${expressionMulti ? details.expressions.length : 1}`;
+ node.dataset.definitionCount = `${definitionMulti ? details.definitions.length : 1}`;
DisplayGenerator._appendMultiple(expressionsContainer, this.createTermExpression.bind(this), details.expressions, [details]);
DisplayGenerator._appendMultiple(reasonsContainer, this.createTermReason.bind(this), details.reasons);