From e6fd1df0569fa515ce5f9b679896d3067713deae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Larivi=C3=A8re?= <timothe.lariviere@outlook.com> Date: Fri, 26 Jun 2020 09:18:37 +0200 Subject: [PATCH] Fix attached properties --- .../src/Fabulous.CodeGen/Generator/CodeGenerator.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fabulous.CodeGen/src/Fabulous.CodeGen/Generator/CodeGenerator.fs b/Fabulous.CodeGen/src/Fabulous.CodeGen/Generator/CodeGenerator.fs index a2cd3d49f..132d13fec 100644 --- a/Fabulous.CodeGen/src/Fabulous.CodeGen/Generator/CodeGenerator.fs +++ b/Fabulous.CodeGen/src/Fabulous.CodeGen/Generator/CodeGenerator.fs @@ -129,8 +129,8 @@ module CodeGenerator = else w.printfn " match prev%sOpt, curr%sOpt with" ap.UniqueName ap.UniqueName w.printfn " | ValueSome prevChildValue, ValueSome currChildValue when prevChildValue = currChildValue -> ()" - w.printfn " | _, ValueSome currChildValue -> %s.Set%s(targetChild, %s currChildValue)" data.FullName ap.Name ap.ConvertModelToValue - w.printfn " | ValueSome _, ValueNone -> %s.Set%s(targetChild, %s)" data.FullName ap.Name ap.DefaultValue + w.printfn " | _, ValueSome currChildValue -> targetChild.SetValue(%s.%sProperty, %s currChildValue)" data.FullName ap.Name ap.ConvertModelToValue + w.printfn " | ValueSome _, ValueNone -> targetChild.ClearValue(%s.%sProperty)" data.FullName ap.Name w.printfn " | _ -> ()" w.printfn " )"