Permalink
Browse files

Fix bug in scroll content backgroundColor comparison with null

  • Loading branch information...
Koen Bok
Koen Bok committed Dec 28, 2015
1 parent b71627c commit 59923c4a3c0b13c92cc45a314dd649ec6010c32f
Showing with 9 additions and 1 deletion.
  1. +1 −1 framer/Components/ScrollComponent.coffee
  2. +8 −0 test/tests/ScrollComponentTest.coffee
@@ -162,7 +162,7 @@ class exports.ScrollComponent extends Layer
# color around until you set a content layer so you can see the ScrollComponent
# on your screen after creation.
if @content.subLayers.length
if @content.backgroundColor.isEqual(Framer.Defaults.Layer.backgroundColor)
if @content.backgroundColor?.isEqual(Framer.Defaults.Layer.backgroundColor)
@content.backgroundColor = null
@define "scroll",
@@ -69,3 +69,11 @@ describe "ScrollComponent", ->
scroll = ScrollComponent.wrap(layerA)
scroll.width.should.equal Screen.width
scroll.height.should.equal Screen.height
it "should work with null backgroundColor", ->
layerA = new Layer
layerB = new Layer superLayer:layerA
delete layerA._properties.backgroundColor
scroll = ScrollComponent.wrap(layerA)

0 comments on commit 59923c4

Please sign in to comment.