Fix error during pitch accent info generation for kanji data (#744)

This commit is contained in:
toasted-nutbread 2020-08-22 13:10:50 -04:00 committed by GitHub
parent cc9481bd38
commit e9c540a0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,11 @@
class DictionaryDataUtil { class DictionaryDataUtil {
static getPitchAccentInfos(definition) { static getPitchAccentInfos(definition) {
if (typeof definition.character === 'string') {
// Kanji
return [];
}
const results = new Map(); const results = new Map();
const allExpressions = new Set(); const allExpressions = new Set();
const allReadings = new Set(); const allReadings = new Set();