mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
[backport core/1.42] fix: make gradient_stops enumerable so it survives object spread (#10866)
Backport of #10406 to `core/1.42` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10866-backport-core-1-42-fix-make-gradient_stops-enumerable-so-it-survives-object-spread-33a6d73d3650819086dfc5cd7a395aed) by [Unito](https://www.unito.io) Co-authored-by: Terry Jia <terryjia88@gmail.com>
This commit is contained in:
@@ -30,6 +30,7 @@ describe('PrimitiveFloat widget type bridging', () => {
|
||||
})
|
||||
|
||||
Object.defineProperty(widget.options, 'gradient_stops', {
|
||||
enumerable: true,
|
||||
get: () => properties.gradient_stops,
|
||||
set: (v) => {
|
||||
properties.gradient_stops = v
|
||||
|
||||
@@ -169,6 +169,7 @@ function onCustomFloatCreated(this: LGraphNode) {
|
||||
})
|
||||
|
||||
Object.defineProperty(valueWidget.options, 'gradient_stops', {
|
||||
enumerable: true,
|
||||
get: () => this.properties.gradient_stops,
|
||||
set: (v) => {
|
||||
this.properties.gradient_stops = v
|
||||
|
||||
Reference in New Issue
Block a user