Skip to content

Commit

Permalink
mui#16491 Revise null check to only have an effect when NODE_ENV === …
Browse files Browse the repository at this point in the history
…'test'.
  • Loading branch information
dondi authored and oliviertassinari committed Jul 9, 2019
1 parent e846fb6 commit 66a4471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/material-ui/src/TextareaAutosize/TextareaAutosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const TextareaAutosize = React.forwardRef(function TextareaAutosize(props, ref)
const [state, setState] = React.useState({});

const syncHeight = React.useCallback(() => {
const input = inputRef.current;
if (input === null) {
if (process.env.NODE_ENV === 'test' && inputRef.current === null) {
return;
}

const input = inputRef.current;
const computedStyle = window.getComputedStyle(input);

const inputShallow = shadowRef.current;
Expand Down

0 comments on commit 66a4471

Please sign in to comment.