     visibleHeight > height / 2
 
   getElement: (selector) ->
-    return if _.isEmpty(selector)
+    return if isEmpty(selector)
     @_scrollingTargetDOM().querySelector(selector)
 
   _onBeforeScroll: (el) ->


  _onAfterScroll: (el, options) ->
    if el?.classList?.contains('target-scroll')
      _.delay(el.classList.remove.bind(el.classList, 'target-scroll'), 150)
    @props.windowImpl.history.pushState(null, null, "##{el.id}") if options.updateHistory
    @onAfterScroll?(el)



  scrollToElement: (el, options = {} ) ->
    win       = @props.windowImpl
    endPos    = @_desiredTopPosition(el, options)

    if options.immediate is true
      win.scroll(0, endPos)
