Skip to content

Commit

Permalink
fix: destructure data in drawLineDecoration
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 15, 2021
1 parent c055f0e commit 7579528
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/mixins/canvas-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,11 @@ const frontDecorationDispatcher = {
* @access private
*/
function drawLineDecoration (decoration, data, decorationColor) {
data.context.fillStyle = decorationColor
data.context.fillRect(0, data.yRow, data.canvasWidth, data.lineHeight)

const { context, lineHeight, canvasWidth, yRow } = data

context.fillStyle = decorationColor
context.fillRect(0, yRow, canvasWidth, lineHeight)
}

/**
Expand Down

0 comments on commit 7579528

Please sign in to comment.