   # Handler for the global beforeControllerDispose event.
   scroll: (controller) ->
     # Reset the scroll position.
-    scrollTo = @settings.scrollTo
-    if scrollTo
-      window.scrollTo scrollTo[0], scrollTo[1]
+    position = @settings.scrollTo
+    if position
+      window.scrollTo position[0], position[1]
 
   # Handler for the global dispatcher:dispatch event.
   # Change the document title to match the new controller.

      skipRouting: '.noscript'
      # Per default, jump to the top of the page.
      scrollTo: [0, 0]
    @route = @settings.routeLinks

    super


  # -----------------------------------

  startLinkRouting: ->
    route = @settings.routeLinks
    @$el.on 'click', route, @openLink if route

  stopLinkRouting: ->
    route = @settings.routeLinks
    @$el.off 'click', route if route

  isExternalLink: (link) ->
    link.target is '_blank' or
