latticexyz / mud

MUD is a framework for building autonomous worlds
https://mud.dev
MIT License
736 stars 184 forks source link

dev tools table explorer shows null arrays for `KeysWithValue` #949

Open alvrs opened 1 year ago

alvrs commented 1 year ago

It seems like the dev tools' table explorer shows arrays only containing null for all KeysWithValues tables, while the store events view shows the correct value. (Note that these tables are not actually relevant for the client, but it might point to some decoding bug in our networking code or the dev tools visualization)

CleanShot 2023-05-22 at 15 02 17@2x CleanShot 2023-05-22 at 15 01 59@2x
yonadaaa commented 1 year ago

This is a wider issue with how Dev UI handles array fields. When serialising the object here, it returns null on numerical keys (ie. array indices). Arrays are awkward to display regardless but a null value is confusing.