diff --git a/frontend/src/lib/components/apps/rx.ts b/frontend/src/lib/components/apps/rx.ts index 0f852aeac2..2d72ab5991 100644 --- a/frontend/src/lib/components/apps/rx.ts +++ b/frontend/src/lib/components/apps/rx.ts @@ -167,7 +167,13 @@ export function settableOutput(state: Writable, previousValue: T): Ou function set(x: T, force: boolean = false) { if (!deepEqual(value, x) || force) { state.update((x) => x + 1) - value = x + + if (typeof x === 'object') { + value = JSON.parse(JSON.stringify(x)) + } else { + value = x + } + subscribers.forEach((x) => x.next(value!)) } }