Skip to content

Commit

Permalink
fix[devtools]: display NaN as string in values (#26947)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
hoxyq committed Jun 14, 2023
1 parent a1723e1 commit f5c249d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f5c249d

Please sign in to comment.