From 7d9d42a23f20b9555357d673b3b328b454689b5a Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 23 Aug 2016 13:33:51 -0700 Subject: [PATCH] Fix i18nCoverage bug Sometimes, translations is undefined, so check that it exists --- app/models/CocoModel.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee index 0de5644c0..d6492218a 100644 --- a/app/models/CocoModel.coffee +++ b/app/models/CocoModel.coffee @@ -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