Skip to content
Permalink
Browse files

Remove unnecessary variable

  • Loading branch information
Jonas Treub
Jonas Treub committed Jun 28, 2017
1 parent 714bc24 commit e65f58347270a3840d89606036c796eb5dc2df5d
Showing with 4 additions and 5 deletions.
  1. +4 −5 framer/Layer.coffee
@@ -886,19 +886,18 @@ class exports.Layer extends BaseClass
@_getPropertyValue "image"
set: (value) ->

currentValue = @_getPropertyValue "image"

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

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

currentValue = @_getPropertyValue "image"

if currentValue is value
return @emit "load"

0 comments on commit e65f583

Please sign in to comment.
You can’t perform that action at this time.