[pmg-devel] applied: [PATCH] panel/acme-domains: fix cyclic dependency in view model

Dietmar Maurer dietmar at proxmox.com
Tue Mar 23 19:22:27 CET 2021


> So, if on evaluation a get(X) is missed due to it being not always called,
> like with boolean statements where a single truthy is enough for an or expression
> like above, that data dependency is lost and one may see bug like behaviour.
> 
> Use intermediate variables to combat that, for example, above `accountValueHidden`
> formula should read:
> 
> accountValueHidden: (get) => {
>     let editable = get('accountEditable'), available = get('accountsAvailable');
>     return !editable || !available;
> },

I guess a good JIT can still optimize that away?




More information about the pmg-devel mailing list