   handleAlertChanged: (e) ->
     @setState
       messageWidth: document.getElementById('alert-area').offsetWidth
-    if e?.detail?.alertWidth?
-      containerWidth = e.detail.alertWidth
-    else
-      containerWidth = document.getElementById('alert-container').offsetWidth
     contentWidth = document.getElementById('alert-area').offsetWidth
-    overflow = containerWidth < contentWidth
+    overflow = @alertWidth < contentWidth
     @handleMessageScroll(overflow)
 
   handleAlert: (e) ->

      attributes: true
      subtree: true
    observer.observe(target, options)
  componentWillUnmount: ->
    window.removeEventListener 'poi.alert', @handleAlert
    window.removeEventListener 'alert.change', @alertWidthChange

      else
        @stickyEnd = null
      @message = e.detail.message
      @messageOld = @message
      @messageType = e.detail.type
      @updateAlert()

  componentDidMount: ->
    window.addEventListener 'poi.alert', @handleAlert
    window.addEventListener 'alert.change', @alertWidthChange
    @alertWidth = document.getElementById('alert-container').offsetWidth
    @message = @state.message
    @messageOld = @message
    @needUpdate = false
    observer = new MutationObserver(@handleAlertChanged)
    target = document.getElementById('alert-area')
    options =
