 
   # Maybe a preexisting template helper on the component's base template.
   if component
+    # We know that component is really a component.
     if (helper = component._componentInternals?.templateBase?.__helpers.get name)?
       return wrapHelper bindDataContext(helper), templateInstance
 

    templateBase

callTemplateBaseHooks = (component, hookName) ->
  component._componentInternals ?= {}

  # In mixins we do not have a template instance. There is also
  # no reason for a template instance to extend a Blaze template.
  return unless component._componentInternals.templateInstance

  templateInstance = Tracker.nonreactive ->
    component._componentInternals.templateInstance()

      template

  removeComponent: ->
    Blaze.remove @component()._componentInternals.templateInstance().view if @isRendered()

  @renderComponentToHTML: (parentComponent, parentView, data) ->
    component = Tracker.nonreactive =>
