rjaros / kvision

Object oriented web framework for Kotlin/JS
https://kvision.io
MIT License
1.2k stars 66 forks source link

SimplePanel.add - Uncaught TypeError: Cannot read properties of undefined #497

Open reubenfirmin opened 7 months ago

reubenfirmin commented 7 months ago

When adding a custom component (ultimately inherited from a div) to a container that's not yet added to the dom:

Uncaught TypeError: Cannot read properties of undefined (reading 'get_parent_hy4reb_k$')
protoOf.addInternal_6ctbi9_k$       SimplePanel.kt:113
protoOf.add_x3j28u_k$               SimplePanel.kt:132
CanvasView                          CanvasView.kt:87

This does not happen several lines up where I add a Main to the same container.

rjaros commented 7 months ago

Could you provide some source?

rjaros commented 7 months ago

From the stacktrace I would suspect you are trying to add a reference to some uninitialized or null object.