From f7b971104f38f4c187cb3eadc620ef6df180c503 Mon Sep 17 00:00:00 2001 From: Brian M Hunt Date: Fri, 28 Feb 2020 10:33:20 -0500 Subject: [PATCH] jsx) fix observable properties being overwritten with observed values --- CHANGELOG.md | 4 ++++ packages/utils.jsx/src/JsxObserver.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6a701f6..d0966b84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ For TODO between alpha and release, see https://github.com/knockout/tko/issues/1 +## 👑 `alpha 9` (28 Feb 2020) + +* Fix JSX observable properties being overwritten with observed value on the NativeProvider + ## 🐇 `alpha 8.4a` (24 Oct 2019) * Make the `NativeProvider` less preemptive i.e. allow other bindings to proceed if there are no native (JSX) bindings. This means `data-bind` and other attributes can be used inside JSX. diff --git a/packages/utils.jsx/src/JsxObserver.js b/packages/utils.jsx/src/JsxObserver.js index 3827a2f1..b94a74b3 100644 --- a/packages/utils.jsx/src/JsxObserver.js +++ b/packages/utils.jsx/src/JsxObserver.js @@ -350,7 +350,7 @@ export class JsxObserver extends LifeCycle { toRemove.delete(name) if (isObservable(value)) { subscriptions.push( - value.subscribe(attr => this.setNodeAttribute(node, name, attr))) + value.subscribe(attr => this.setNodeAttribute(node, name, value))) } this.setNodeAttribute(node, name, value) }