Skip to content

Commit 6d83b6a

Browse files
authored
fix(frontend): dont derivate state when there is nothing to derive (#92)
1 parent e1503e1 commit 6d83b6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Textarea.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class ReactTextareaAutocomplete extends React.Component<
8585
}
8686

8787
static getDerivedStateFromProps({ value }: TextareaProps) {
88+
if (!value) return null;
89+
8890
return {
8991
value,
9092
};

0 commit comments

Comments
 (0)