 
   makeThangComponentConfigView: (thangComponent) ->
     component = @supermodel.getModelByOriginal(LevelComponent, thangComponent.original)
-    return unless component
+    return unless component?.loaded
     config = thangComponent.config ? {}
     configView = new ThangComponentConfigView({
       supermodel: @supermodel


  loadComponents: (components) ->
    for componentRef in components
      levelComponent = new LevelComponent(componentRef)
      url = "/db/level.component/#{componentRef.original}/version/#{componentRef.majorVersion}"
      levelComponent.setURL(url)

    @reportChanges()

  updateComponentsList: ->
    # Before I was setting the data to the existing treema but then we had some
    # nasty sorting/callback bugs. This is less efficient, but it's also less bug prone.
    @buildComponentsTreema()

  onComponentsAdded: ->
    return unless @componentsTreema
