mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Fix i18nCoverage bug
Sometimes, translations is undefined, so check that it exists
This commit is contained in:
parent
24848da7bf
commit
7d9d42a23f
1 changed files with 1 additions and 1 deletions
|
@ -426,7 +426,7 @@ class CocoModel extends Backbone.Model
|
|||
# get a list of lang codes where its object has keys for every prop to be translated
|
||||
coverage = _.filter(_.keys(i18n), (langCode) ->
|
||||
translations = i18n[langCode]
|
||||
_.all((translations[prop] for prop in props))
|
||||
translations and _.all((translations[prop] for prop in props))
|
||||
)
|
||||
#console.log 'got coverage', coverage, 'for', path, props, workingSchema, parentData
|
||||
langCodeArrays.push coverage
|
||||
|
|
Loading…
Reference in a new issue