From f4b22fedc9a1e1f28e2c2f77afd210175a64a1a0 Mon Sep 17 00:00:00 2001
From: Scott Erickson <sderickson@gmail.com>
Date: Sat, 12 Jul 2014 09:55:26 -0700
Subject: [PATCH] Tweaking the visuals for the i18n treema node to mostly
 ignore the property required to get around mongoose not handling empty
 objects.

---
 app/treema-ext.coffee | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/app/treema-ext.coffee b/app/treema-ext.coffee
index 314f30149..c7b6fac65 100644
--- a/app/treema-ext.coffee
+++ b/app/treema-ext.coffee
@@ -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