Skip to content

Fix formatting of number 0 in remote object when description is not set - #1968

Merged
Connor Peet (connor4312) merged 1 commit into
microsoft:mainfrom
Beanyy:main
Mar 15, 2024
Merged

Fix formatting of number 0 in remote object when description is not set#1968
Connor Peet (connor4312) merged 1 commit into
microsoft:mainfrom
Beanyy:main

Conversation

@Beanyy

@Beanyy Beanyy commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

Fix for issue reported here: #1967

Some Javascript Debuggee CDP implementations (Hermes) return the a RemoteObject of type=number , value=0 and the description and unserializableValue fields unset. This causes RemoteObjects with type=number and value=0 to be rendered as NaN due to the logic of formatting numbers here:

if (param.type === 'number') {
if ('unserializableValue' in param) {
return param.unserializableValue;
}
const value = param.value || +param.description;
return format?.hex ? value.toString(16) : String(value);
}

@connor4312 Connor Peet (connor4312) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't worry about the test failures, those are some known flakes I need to fix

@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) March 15, 2024 02:57
@vscodenpa VS Code Bot (vscodenpa) added this to the March 2024 milestone Mar 15, 2024
@connor4312
Connor Peet (connor4312) merged commit 82fb723 into microsoft:main Mar 15, 2024
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.

5 participants