From 95b859209f846857555798d5e17cc48ef643db41 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Tue, 12 Feb 2019 21:09:33 -0500 Subject: [PATCH] Fixed NaN warning for pre-mount CSS prop read --- src/devtools/views/Tree.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/devtools/views/Tree.js b/src/devtools/views/Tree.js index 2326415ec7..a696c815dd 100644 --- a/src/devtools/views/Tree.js +++ b/src/devtools/views/Tree.js @@ -79,12 +79,13 @@ export default function Tree(props: Props) { [baseDepth, numElements, getElementAtIndex] ); - const itemSize = parseInt( - getComputedStyle((document.body: any)).getPropertyValue( - '--line-height-data' - ), - 10 - ); + const itemSize = + parseInt( + getComputedStyle((document.body: any)).getPropertyValue( + '--line-height-data' + ), + 10 + ) || 18; return (