fix[devtools]: display NaN as string in values (#26947)

## Summary

>Warning: Received NaN for the `children` attribute. If this is
expected, cast the value to a string.

Fixes this warning, when we try to display NaN as NaN in key-value list.
This commit is contained in:
Ruslan Lesiutin 2023-06-14 11:45:30 +01:00 committed by GitHub
parent a1723e18fd
commit f5c249db8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,6 +255,8 @@ export default function KeyValue({
displayValue = 'null';
} else if (value === undefined) {
displayValue = 'undefined';
} else if (isNaN(value)) {
displayValue = 'NaN';
}
let shouldDisplayValueAsLink = false;