From eea72da1bbf29baa17d5548506960807ed41b032 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 3 Jul 2019 19:14:31 +0200 Subject: [PATCH] :bug: corrige la page blanche lorsque l'on saisi une valeur faible dans les simulateurs --- source/components/ui/AnimatedTargetValue.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/components/ui/AnimatedTargetValue.js b/source/components/ui/AnimatedTargetValue.js index 0cdf27955..55a60514d 100644 --- a/source/components/ui/AnimatedTargetValue.js +++ b/source/components/ui/AnimatedTargetValue.js @@ -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({