hilla
hilla copied to clipboard
NPE using multi-select-combo-box with binder
Description of the bug
When I try to combine multi-select-combo-box with the form binder and a slightly more complex data structure i'm getting an exception that map can't be read from undefined.
Minimal reproducible example
my-hilla-app.zip Here is a minimal example to reproduce the error. the exception will be thrown the moment you select the 2nd user.
Details for the bug
The exception is thrown in BinderNode.runOwnValidators because _this[validators] is undefined.
This is a stack trace of my chrome browser in that moment. Stackframes A and B refer to the same object instance and comparing that with the constructor of BinderNode one can see that initializeValue (which eventually call runOwnValidators) is called before _this[validators] is initialized.
Interesting to note, that error does not occur under all circumstances. If you remove the property shortCut from com.example.application.endpoints.helloworld.transfer.NamedEntity the error will vanish.
Versions:
- Hilla version: 1.2.1
- Java version: 17.0.2
- OS version: macOS 12.6