Skip to content

[web-console] ad-hoc: format invalid number values as-is, not as 'null'#6473

Open
Karakatiza666 wants to merge 1 commit into
mainfrom
issue6341
Open

[web-console] ad-hoc: format invalid number values as-is, not as 'null'#6473
Karakatiza666 wants to merge 1 commit into
mainfrom
issue6341

Conversation

@Karakatiza666

Copy link
Copy Markdown
Contributor

The NaN/Inf values were formatted by a JSON.stringify() that prints null in these cases; now detecting such values and serializing them as-is. Valid numbers are still serialized with JSON.stringify downstream

Fix #6341

Testing: manual, added unit tests

image

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
@Karakatiza666 Karakatiza666 requested a review from mihaibudiu June 15, 2026 12:28

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

}
if (!Array.isArray(value)) {
return JSONbig.stringify(value, undefined, 1)
return formatNonFiniteNumber(value) ?? JSONbig.stringify(value, undefined, 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what if this is a ROW value? Or a Map value?

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.

[web-console] Special floating point values are not handled correctly

3 participants