Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.table() does not display values for numeric keys #14415

Closed
RobinTail opened this issue Oct 8, 2024 · 0 comments · Fixed by #14484
Closed

console.table() does not display values for numeric keys #14415

RobinTail opened this issue Oct 8, 2024 · 0 comments · Fixed by #14484
Labels
assertion failed Crashes in a build with assertions enabled bug Something isn't working console Related to console apis

Comments

@RobinTail
Copy link

RobinTail commented Oct 8, 2024

What version of Bun is running?

1.1.30+7996d06b8

What platform is your computer?

Darwin 23.6.0 x86_64 i386

What steps can reproduce the bug?

having the object with numeric keys:

console.table({test: {"10": 123, "100": 154}});

What is the expected behavior?

should work with numeric keys like it does in Node.js

┌─────────┬─────┬─────┐
│ (index) │ 10  │ 100 │
├─────────┼─────┼─────┤
│ test    │ 123 │ 154 │
└─────────┴─────┴─────┘

What do you see instead?

v1.1.30 displays no values:

┌──────┬─────┬─────┐
│      │ 10  │ 100 │
├──────┼─────┼─────┤
│ test │     │     │
└──────┴─────┴─────┘

Additional information

  • used to work fine in 1.1.29
  • adding space character is a workaround (it makes it work):
console.table({test: {" 10": 123, " 100": 154}});
┌──────┬─────┬──────┐
│      │  10 │  100 │
├──────┼─────┼──────┤
│ test │ 123 │ 154  │
└──────┴─────┴──────┘
@RobinTail RobinTail added bug Something isn't working needs triage labels Oct 8, 2024
@RobinTail RobinTail changed the title console.table does not display values for numeric keys console.table() does not display values for numeric keys Oct 8, 2024
@nektro nektro added console Related to console apis assertion failed Crashes in a build with assertions enabled and removed needs triage labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assertion failed Crashes in a build with assertions enabled bug Something isn't working console Related to console apis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants