Merge pull request #596 from betagouv/quickfix

🐛 corrige la page blanche lorsque l'on saisi une valeur faible da…
pull/595/head
Johan Girod 2019-07-03 19:35:01 +02:00 committed by GitHub
commit 6399addb08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,10 @@ export default withLanguage(
state = { difference: 0 }
componentDidUpdate(prevProps) {
if (prevProps.value === this.props.value) {
if (
prevProps.value === this.props.value ||
Number.isNaN(this.props.value)
) {
return
}
this.setState({