mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fixed NaN warning for pre-mount CSS prop read
This commit is contained in:
@@ -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