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.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js
index 0cf1e8c6..63140330 100644
--- a/ext/mixed/js/display-generator.js
+++ b/ext/mixed/js/display-generator.js
@@ -311,7 +311,7 @@ class DisplayGenerator {
node.title = details.notes;
inner.textContent = details.name;
node.dataset.category = details.category;
- if (details.redundant) { node.dataset.redundant = true; }
+ if (details.redundant) { node.dataset.redundant = 'true'; }
return node;
}
@@ -338,7 +338,16 @@ class DisplayGenerator {
const tag = this._createTag({notes: '', name: dictionary, category: 'pitch-accent-dictionary'});
node.querySelector('.term-pitch-accent-group-tag-list').appendChild(tag);
+ let hasTags = false;
+ for (const {tags} of pitches) {
+ if (tags.length > 0) {
+ hasTags = true;
+ break;
+ }
+ }
+
const n = node.querySelector('.term-pitch-accent-list');
+ n.dataset.hasTags = `${hasTags}`;
this._appendMultiple(n, this._createPitch.bind(this), pitches);
return node;