Slightly better error check

This commit is contained in:
Jakub 2026-07-12 12:23:47 +08:00
parent 7e463fceea
commit 147b56f051

View file

@ -23,7 +23,8 @@ heading component:
(h1 ~vnode.state.title))
:title \"Title Text\"))
```"
(when (= (remainder (length args) 2 1))
(when (and (not (null? args))
(= (remainder (length args) 2 1)))
(error (format
"mithril:comp-> Component macro expects even length args list.