mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Fixed NaN warning for pre-mount CSS prop read
This commit is contained in:
1 parent
d203ebf165
commit
95b859209f
1 file changed
+7
-6
@@ -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 (
|
||||
<div className={styles.Tree}>
|
||||
|
||||
Reference in new issue
Block a user