Ignore ids not in phonology when formatting a word.

This commit is contained in:
Feufochmar 2018-06-03 19:06:49 +02:00
parent 340e459517
commit 79133f4e70
1 changed files with 2 additions and 3 deletions

View File

@ -121,9 +121,8 @@ phonagen.formatWord = function (phonemes, phonology) {
for (var writing of phonology.transcriptions) {
var word = ""
for (var id of phonemes) {
var letter = phonology.entries.get(id)[writing]
if (typeof letter !== "undefined") {
word += letter
if (phonology.entries.has(id)) {
word += phonology.entries.get(id)[writing]
}
}
wordTranscriptions.set(writing, word)