   @currentHighlightedPaletteBlock = null
 
   # Add new blocks
-  for data in @currentPaletteMetadata
+  for data in @session.currentPaletteMetadata
     block = data.block
 
     hoverDiv = document.createElement 'div'

# ================================

Editor::overflowsX = ->
  @documentDimensions().width > @session.viewportDimensions().width

Editor::overflowsY = ->
  @documentDimensions().height > @session.viewportDimensions().height

Editor::documentDimensions = ->
  bounds = @session.view.getViewNodeFor(@session.tree).totalBounds

      state.consumedHitTest = true
      return

    for entry in @session.currentPaletteBlocks
      hitTestResult = @hitTest palettePoint, entry.block, @session.paletteView

      if hitTestResult?
