mirror of
https://github.com/storytold/deckcraft.git
synced 2026-12-02 02:36:14 -06:00
`str_param` answers `None` both for an absent key and for a key holding something
that is not a string, so `typeface_param` read the two as the same thing. With
`{"family": "Lato", "eastAsia": 42}` the command set the Latin typeface, left the
East Asian one as it was and reported success -- the one thing the caller asked
for was the one thing that did not happen (noted in review).
Read through `p.get(key)` instead, the way `opt_usize_param` and `id_param`
already read theirs: an absent key, and an explicit `null`, still mean the script
keeps its typeface; anything else present has to be a string.
`family` is judged the same way, so `{"family": 42}` now says the key is not a
typeface name rather than that it is missing.