Skip to content

Commit

Permalink
fix(frontend): Fix rx (#1609)
Browse files Browse the repository at this point in the history
* fix(frontend): Fix inputValue connection to ensure done event is always sent

* fix(frontend): Fix RX
  • Loading branch information
fatonramadani committed May 19, 2023
1 parent 632be3b commit c687a77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/lib/components/apps/rx.ts
Expand Up @@ -167,7 +167,13 @@ export function settableOutput<T>(state: Writable<number>, 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!))
}
}
Expand Down

0 comments on commit c687a77

Please sign in to comment.