Handling empty context objects in i18n edit view.

This commit is contained in:
Nick Winter 2015-03-01 09:40:05 -08:00
parent 81b4cfed15
commit dc56a50b75
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ module.exports = class I18NEditComponentView extends I18NEditModelView
@wrapRow "#{propDoc.name} description", ['description'], propDoc.description, i18n[lang]?.description, path, 'markdown'
if context = propDoc.context
for key, value of context
@wrapRow "#{propDoc.name} context value", ['context', key], value, i18n[lang]?.context[key], path
@wrapRow "#{propDoc.name} context value", ['context', key], value, i18n[lang]?.context?[key], path
#- Component return value descriptions
if i18n = propDoc.returns?.i18n

View file

@ -57,4 +57,4 @@ module.exports = class I18NEditLevelView extends I18NEditModelView
if (i18n = method.i18n) and (context = method.context)
for key, value of context
path = ['thangs', thangIndex, 'components', componentIndex, 'config', 'programmableMethods', methodName]
@wrapRow 'Code comment', ['context', key], value, i18n[lang]?.context[key], path
@wrapRow 'Code comment', ['context', key], value, i18n[lang]?.context?[key], path