[backport cloud/1.42] fix: make gradient_stops enumerable so it survives object spread (#10406) (#10895)

Backport of #10406 to cloud/1.42. Clean cherry-pick.

Co-authored-by: Terry Jia <terryjia88@gmail.com>
This commit is contained in:
Christian Byrne
2026-04-06 14:57:57 -07:00
committed by GitHub
parent 0babdb4fe3
commit 366668b104
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