alephjs/aleph.js

`<Link>`'s `to` prop should accept `undefined`/`null`/`""` as values

aslilac opened this issue · 1 comments

In particular, you get a runtime error when passing "" because it fails a truth-y check. Being able to pass undefined and null, and treating them as "" would be an additional bonus.

Looking into the source, it was clear that the property isn't optional.
I'm not sure if this would be a good change.

You can validate the to prop before creating the element.
I don't know, maybe the owners of the project could give some light on this topic.