           return kd.warn err
 
         @logs.add 'custom variables loaded'
+        @_loadedTemplates.push templateId
 
         { meta } = data
-        if (Object.keys meta).length
-          content = if rawContent = meta.__rawContent
-          then rawContent
-          else (jsonToYaml meta).content
+        if (Object.keys meta).length > 1
+          content = meta.__rawContent ? (jsonToYaml meta).content
 
           @editor.setContent unescape content

module.exports = class VariablesController extends BaseController


  setData: (data) ->

    super data



  reviveCredential: (identifier, templateId) ->

    return  if templateId in @_loadedTemplates

    @editor.setClass 'loading'
    @logs.add 'loading custom variables'
