Changeset - b697752b35f9
[Not reviewed]
default
0 1 0
Drew Perttula - 6 years ago 2019-05-30 08:31:29
drewp@bigasterisk.com
note about a bug
Ignore-this: 6cc4dbd36a5cdc32496f114d5649b8e0
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/web/live/live.coffee
Show inline comments
 
@@ -341,12 +341,15 @@ class GraphToControls
 

	
 
  controlChanged: (device, deviceAttr, value) ->
 
    # value is float or #color or (Uri or null)
 
    if (value == undefined or (typeof value == "number" and isNaN(value)) or (typeof value == "object" and value != null and not value.id))
 
      throw new Error("controlChanged sent bad value " + value)
 
    effectSetting = @activeSettings.effectSettingLookup(device, deviceAttr)
 

	
 
    # sometimes this misses an existing setting, which leads to a mess
 
    
 
    if @shouldBeStored(deviceAttr, value)
 
      if not effectSetting?
 
        @_addEffectSetting(device, deviceAttr, value)
 
      else
 
        @_patchExistingEffectSetting(effectSetting, deviceAttr, value)
 
    else
0 comments (0 inline, 0 general)