From 992156f0d19e498bb1de08f15a0d33ff490c9a7c Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sat, 21 Oct 2023 23:01:52 +0100 Subject: :bug: Fixed a bug where component attributes weren't compared for equality properly. --- src/lustre.ffi.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lustre.ffi.mjs b/src/lustre.ffi.mjs index f29e7ea..4555277 100644 --- a/src/lustre.ffi.mjs +++ b/src/lustre.ffi.mjs @@ -192,7 +192,7 @@ export const setup_component = ( // messages when the value is an object or array: it might not have // changed but its reference might have and we don't want to trigger // useless updates. - if (decoded.isOk() && !isEqual(prev, decoded[0])) { + if (decoded.isOk() && !isEqual(prev, value)) { this.#dispatch(decoded[0]); } -- cgit v1.2.3