Skip to content

Commit

Permalink
Remove unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Treub committed Jun 28, 2017
1 parent 714bc24 commit e65f583
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions framer/Layer.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -886,19 +886,18 @@ class exports.Layer extends BaseClass
@_getPropertyValue "image" @_getPropertyValue "image"
set: (value) -> set: (value) ->


currentValue = @_getPropertyValue "image"

if LinearGradient.isLinearGradient(value) if LinearGradient.isLinearGradient(value)
oldValue = @_getPropertyValue "image" @emit("change:gradient", value, currentValue)
@emit("change:gradient", value, oldValue) @emit("change:image", value, currentValue)
@emit("change:image", value, oldValue)
@_setPropertyValue("image", value) @_setPropertyValue("image", value)
@style["background-image"] = value.toCSS() @style["background-image"] = value.toCSS()
return return


if not (_.isString(value) or value is null) if not (_.isString(value) or value is null)
layerValueTypeError("image", value) layerValueTypeError("image", value)


currentValue = @_getPropertyValue "image"

if currentValue is value if currentValue is value
return @emit "load" return @emit "load"


Expand Down

0 comments on commit e65f583

Please sign in to comment.