[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:
Comfy Org PR Bot
2026-04-07 06:24:54 +09:00
committed by GitHub
parent 3b242cc787
commit cb8931cc4c
2 changed files with 2 additions and 0 deletions

View File

@@ -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

View File

@@ -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