From 6735357dd115d5f01d0732358fdf2d054abcb54c Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 30 Jun 2015 14:46:29 +0200 Subject: [PATCH] Retrieve `backgroundColor` from the correct object Thanks, @nathansobo! :sparkles: --- src/line-numbers-tile-component.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/line-numbers-tile-component.coffee b/src/line-numbers-tile-component.coffee index 155c9a23a..cf58c54f3 100644 --- a/src/line-numbers-tile-component.coffee +++ b/src/line-numbers-tile-component.coffee @@ -20,7 +20,7 @@ class LineNumbersTileComponent updateSync: (state) -> @newState = state unless @oldState - @oldState = {tiles: {}} + @oldState = {tiles: {}, styles: {}} @oldState.tiles[@id] = {lineNumbers: {}} @newTileState = @newState.tiles[@id] @@ -30,9 +30,9 @@ class LineNumbersTileComponent @domNode.style.display = @newTileState.display @oldTileState.display = @newTileState.display - if @newState.backgroundColor isnt @oldState.backgroundColor - @domNode.style.backgroundColor = @newState.backgroundColor - @oldState.backgroundColor = @newState.backgroundColor + if @newState.styles.backgroundColor isnt @oldState.styles.backgroundColor + @domNode.style.backgroundColor = @newState.styles.backgroundColor + @oldState.styles.backgroundColor = @newState.styles.backgroundColor if @newTileState.height isnt @oldTileState.height @domNode.style.height = @newTileState.height + 'px'