 
   # Internal: Performs the actual {MinimapElement} update.
   update: ->
-    return unless @attached and @isVisible() and not @minimap.isDestroyed()
+    return unless @attached and @isVisible() and @minimap?
 
     if @adjustToSoftWrap and @marginRight?
       @style.marginRight = @marginRight + 'px'

  #           offsetTop - The {MinimapElement} offset at the moment of the
  #                       drag start.
  endDrag: (e, initial) ->
    return if @minimap.isDestroyed()
    @dragSubscription.dispose()

  #     ######   ######   ######

  destroy: ->
    @subscriptions.dispose()
    @detach()
    @minimap = null

  #     ######   #######  ##    ## ######## ######## ##    ## ########
  #    ##    ## ##     ## ###   ##    ##    ##       ###   ##    ##
