fix: stop memoizing properties in a way that breaks prop:value (closes #768) (#772)

This commit is contained in:
Greg Johnston 2023-03-30 19:44:38 -04:00 committed by GitHub
parent 16917997cd
commit 1ff56f7bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,12 +94,7 @@ pub(crate) fn property_helper(
create_render_effect(cx, move |old| {
let new = f();
let prop_name = wasm_bindgen::intern(&name);
if old.as_ref() != Some(&new)
&& !(old.is_none()
&& new == wasm_bindgen::JsValue::UNDEFINED)
{
property_expression(&el, prop_name, new.clone())
}
property_expression(&el, prop_name, new.clone());
new
});
}