mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
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:
parent
a1723e18fd
commit
f5c249db8b
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user