@samitouri / QOS-React-2 / commits / 95b859209f

Fixed NaN warning for pre-mount CSS prop read

Brian Vaughn committed Feb 12, 2019 at 21:09 UTC 95b859209f846857555798d5e17cc48ef643db41
1 file changed +7 -6
src/devtools/views/Tree.js
+7 -6
@@ -79,12 +79,13 @@ export default function Tree(props: Props) {
79 [baseDepth, numElements, getElementAtIndex]
80 );
81
82 - const itemSize = parseInt(
83 - getComputedStyle((document.body: any)).getPropertyValue(
84 - '--line-height-data'
85 - ),
86 - 10
87 - );
82 + const itemSize =
83 + parseInt(
84 + getComputedStyle((document.body: any)).getPropertyValue(
85 + '--line-height-data'
86 + ),
87 + 10
88 + ) || 18;
89
90 return (
91 <div className={styles.Tree}>