-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Filled array displayed like [] in debug repl #6444
Comments
It looks like something subtly changed from a number to a string. cjihrig@b64463f appears to fix the problem, but I'm unsure if it is the "correct" fix or not. |
@cjihrig This may be a dumb question, but, like… is there any reason not to just do what the comment says? i.e. check for That code has been around since 0fa3f2f and I think changing it to that would be correct here anyway. // debug repl, node v5.11
> a = [1]; a.b = 2; a
[ 1 ] // normal repl
> a = [1]; a.b = 2; a
[ 1, b: 2 ] I’d expect these to match. |
Good question. It certainly seems like that would be fine, but there could be some historical context that I don't know about. I can put together a PR and see what people say :-) |
@cjihrig … if you don’t I will. 😄 |
Thank you very much! =) |
This commit allows all array properties to be printed except for "length". Previously, this filter was applied by checking the type of each property. However, something changed in V8, and array elements started coming through as numeric strings, which stopped them from being displayed. Fixes: nodejs#6444 PR-URL: nodejs#6448 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
This commit allows all array properties to be printed except for "length". Previously, this filter was applied by checking the type of each property. However, something changed in V8, and array elements started coming through as numeric strings, which stopped them from being displayed. Fixes: #6444 PR-URL: #6448 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
This commit allows all array properties to be printed except for "length". Previously, this filter was applied by checking the type of each property. However, something changed in V8, and array elements started coming through as numeric strings, which stopped them from being displayed. Fixes: nodejs#6444 PR-URL: nodejs#6448 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
This commit allows all array properties to be printed except for "length". Previously, this filter was applied by checking the type of each property. However, something changed in V8, and array elements started coming through as numeric strings, which stopped them from being displayed. Fixes: #6444 PR-URL: #6448 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
This commit allows all array properties to be printed except for "length". Previously, this filter was applied by checking the type of each property. However, something changed in V8, and array elements started coming through as numeric strings, which stopped them from being displayed. Fixes: #6444 PR-URL: #6448 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
This commit allows all array properties to be printed except for "length". Previously, this filter was applied by checking the type of each property. However, something changed in V8, and array elements started coming through as numeric strings, which stopped them from being displayed. Fixes: #6444 PR-URL: #6448 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Steps:
node debug fileName.js
(enter)myVar = [{lol: 'lal'}];
(enter)myVar
(enter)Expected:
[ { lol: 'lal' } ]
Actual:
[]
PS:
The text was updated successfully, but these errors were encountered: