fix(charword_table): use ref to acquire voice data from alternativeId

This commit is contained in:
Haoyu Xu
2023-02-05 21:37:45 -05:00
parent 45bec9a8f6
commit 5adaf1c3e7

View File

@@ -31,9 +31,10 @@ export default class CharwordTable {
}
lookup(operatorName) {
const operatorBlock = this.#charwordTable.operators[this.#getOperatorId(__config.operators[operatorName])]
return {
config: this.#charwordTable.config,
operator: this.#charwordTable.operators[this.#getOperatorId(__config.operators[operatorName])],
operator: operatorBlock.voice[DEFAULT_REGION][0].ref ? this.#charwordTable.operators[operatorBlock.alternativeId] : operatorBlock,
}
}