mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Tweaking the visuals for the i18n treema node to mostly ignore the property required to get around mongoose not handling empty objects.
This commit is contained in:
parent
8cb7cd770c
commit
f4b22fedc9
1 changed files with 7 additions and 0 deletions
|
@ -248,7 +248,14 @@ class JavaScriptTreema extends CodeTreema
|
|||
|
||||
class InternationalizationNode extends TreemaNode.nodeMap.object
|
||||
findLanguageName: (languageCode) ->
|
||||
# to get around mongoose emtpy object bug, there's a prop in the object which needs to be ignored
|
||||
return '' if languageCode is '-'
|
||||
locale[languageCode]?.nativeDescription or "#{languageCode} Not Found"
|
||||
|
||||
getChildren: ->
|
||||
res = super(arguments...)
|
||||
res = (r for r in res when r[0] isnt '-')
|
||||
res
|
||||
|
||||
getChildSchema: (key) ->
|
||||
#construct the child schema here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue