 
 
   closeModal: (e) =>
-    return unless @header.length && @header[0]._open
+    return unless @hasCoverEditor() && @header[0]._open
 
     if e
       return if $(e.target).closest('.js-forum-topic-cover--open-modal').length


  hasCover: =>
    return @uploadButton[0].getAttribute('data-method') != 'post'


  toggleModal: (e) =>



  refresh: =>
    return unless @hasCoverEditor()

    backgroundImage = if @hasCover() then "url('#{@uploadButton[0].getAttribute('data-file-url')}')" else ''
    @header[0].style.backgroundImage = backgroundImage
