   mixins: [AsyncState]
   statics:
     getInitialAsyncState: (params, query, setState) ->
-      promise = Cache.fetchTask(params.id)
-      task: promise
+      {task: Cache.fetchTask(params.id)}
 
   render: ->
     if @state?.task

            raw_html
        return task.content_html

      task: promise
      content_html: htmlPromise

  # HACK to load images from http://archive.cnx.org
  # <img src> tags are parsed **immediately** when the DOM node is created.

    $('base').attr('href', '')

  render: ->
    content_html = @props.task.content_html or @state?.content_html
    if content_html

      <div className='panel panel-default'>
        <div className='panel-heading'>
          Reading Asignment

          <span className='pull-right'>
            <a className='ui-action btn btn-primary btn-sm' target='_window' href={@props.task.content_url}>Open in new Tab</a>
          </span>
        </div>
        <div className='panel-body' dangerouslySetInnerHTML={{__html: content_html}} />
      </div>

    else if @state?.content_html_error
