reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Relax type requirement on pc.cond

Open picklelo opened this issue 3 years ago β€’ 0 comments

Currently the first argument to pc.cond must be a pc.Var with type bool. However since JS is lax about converting anything to a bool, perhaps we can relax this requirement and just allow anything in.

There's a tradeoff here when we do this stuff implicitly as it may lead to unexpected errors. But if it eases development could be worth it.

picklelo avatar Jan 21 '23 23:01 picklelo