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

fix(op_crates/console): console.table value misalignment with varying keys #10127

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

Liamolucko
Copy link
Contributor

Fixes #10111

The behaviour for the second example in the issue (console.table([ {a:0}, {a:1,c:1}, {a:2}, {a:3,c:3} ], ['a','b','c']);) varies between browsers; this implementation is just the way which made the most sense to me. It matches the behaviour of Node and Safari. Chromium excludes the b column entirely, and Firefox orders them as a, c, b rather than a, b, c.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice fix @Liamolucko, thanks!

@bartlomieju bartlomieju merged commit 3c64545 into denoland:main Apr 11, 2021
@Liamolucko Liamolucko deleted the console_table branch April 11, 2021 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

console.table value misalignment with varying keys
2 participants