Closed virusdefender closed 1 year ago
Teal Playground URL: https://559--teal-playground-preview.netlify.app
This is not a bug, this is how Lua works. The
#
operator counts the number of contiguous keys in the array part of the table.
this is not a Lua bug, if you use #
on the map, it may cause logic bug in your code, because you may think it's equal to map_key_number(var)
Merged manually, thank you!!
will get
2
will always get
0
This is probably a bug in your code, it not equal to
map_key_number(var)
If the key inserted to the map is in order (like 1, 2, 3), the result it correct, so
#
on map of number key will throw a warning instead of error.