Status: done Priority: P0 Created: 2026-02-08 Completed: 2026-02-08 Owner: AI
The invalid-history-elements function in chart.cljc:398-415 has multiple inverted conditions in a cond-> chain. It reports errors for VALID history configurations and silently accepts INVALID ones.
NOTE: I can swear there are charts using history in circulation. Perhaps they are not running validation, but be very very sure we're right here.
(= 1 (count transitions)) should be (not= 1 (count transitions))(and (nil? event) (nil? cond)) should be (or (some? event) (some? cond))(or deep? (= 1 (count immediate-children))) — appears to flag deep history as always problematicsrc/main/com/fulcrologic/statecharts/chart.cljc:398-415 - Fix validation logicsrc/test/ - Add validation testsinvalid-history-elementsCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |