Skip to content

Commit

Permalink
🐎 Avoid reading directly from the line's token property
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Dec 3, 2015
1 parent fd55c0c commit e823523
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/mixins/canvas-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ export default class CanvasDrawer extends Mixin {
this.drawDecorations(screenRow, decorations, 'highlight-under', renderData, this.drawHighlightDecoration)

if ((line != null ? line.tokens : void 0) != null) {
for (let j = 0, tokensCount = line.tokens.length; j < tokensCount; j++) {
let token = line.tokens[j]
let tokens = line.tokens
for (let j = 0, tokensCount = tokens.length; j < tokensCount; j++) {
let token = tokens[j]
let w = token.screenDelta
if (!token.isOnlyWhitespace()) {
let color = displayCodeHighlights ? this.getTokenColor(token) : this.getDefaultColor()
Expand Down

0 comments on commit e823523

Please sign in to comment.