Skip to content

Commit

Permalink
Do not pad with zeros when updating field
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesj committed Jun 1, 2017
1 parent 10d172d commit 561e644
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/component/ItineraryTimePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export default class ItineraryTimePicker extends React.Component {
}

componentWillReceiveProps({ initHours, initMin }) {
if (this.props.initHours !== initHours || this.props.initMin !== initMin) {
if (
Number(this.hourEl.value) !== Number(initHours) ||
Number(this.minEl.value) !== Number(initMin)
) {
this.setState({
hours: initHours,
minutes: initMin,
Expand Down

0 comments on commit 561e644

Please sign in to comment.