diff --git a/libs/charword_table.js b/libs/charword_table.js index 9a4736b..10b300c 100644 --- a/libs/charword_table.js +++ b/libs/charword_table.js @@ -110,12 +110,14 @@ export default class CharwordTable { Object.values(data.charWords).forEach(item => { const operatorInfo = Object.values(this.#charwordTable.operators).filter(element => element.info[region][item.wordKey]) if (operatorInfo.length > 0) { - if (typeof operatorInfo[0].voice[region][item.wordKey] === 'undefined') { - operatorInfo[0].voice[region][item.wordKey] = {} - } - operatorInfo[0].voice[region][item.wordKey][item.voiceId] = { - title: item.voiceTitle, - text: item.voiceText.replace(/{@nickname}/g, NICKNAME[region]), + for (const operator of operatorInfo) { + if (typeof operator.voice[region][item.wordKey] === 'undefined') { + operator.voice[region][item.wordKey] = {} + } + operator.voice[region][item.wordKey][item.voiceId] = { + title: item.voiceTitle, + text: item.voiceText.replace(/{@nickname}/g, NICKNAME[region]), + } } } })