diff options
| author | Noah Loomans <noahloomans@gmail.com> | 2018-07-06 21:01:51 +0200 | 
|---|---|---|
| committer | Noah Loomans <noahloomans@gmail.com> | 2018-07-06 21:01:59 +0200 | 
| commit | 7f1dc831265e0ba4f7f13a0e307daf28d91f8a90 (patch) | |
| tree | c330848bf738aa90dee9e13ca1c10caa61d60b49 /src/client/react/components/presentational/Schedule.js | |
| parent | 74ef968a45e147069d044fbfde814886d7275aa3 (diff) | |
client/schedule: Properly handle errors
Diffstat (limited to 'src/client/react/components/presentational/Schedule.js')
| -rw-r--r-- | src/client/react/components/presentational/Schedule.js | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/src/client/react/components/presentational/Schedule.js b/src/client/react/components/presentational/Schedule.js index 727a1f4..9791658 100644 --- a/src/client/react/components/presentational/Schedule.js +++ b/src/client/react/components/presentational/Schedule.js @@ -38,8 +38,11 @@ class Schedule extends React.Component {      this.updateScaling();    } -  componentDidUpdate() { -    this.updateScaling(); +  componentDidUpdate(prevProps) { +    const { htmlStr } = this.props; +    if (prevProps.htmlStr !== htmlStr) { +      this.updateScaling(); +    }    }    componentWillUnmount() { | 
