diff --git a/.eslintrc b/.eslintrc index c9dfe1ae1..6d0352c8a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -80,7 +80,7 @@ rules: no-dupe-keys: 2 no-duplicate-case: 2 no-empty-character-class: 2 - #no-empty: 2 + no-empty: 2 no-ex-assign: 2 no-extra-bind: 2 no-extra-boolean-cast: 0 diff --git a/src/Time/Time.js b/src/Time/Time.js index b7780d651..9f3b024a4 100644 --- a/src/Time/Time.js +++ b/src/Time/Time.js @@ -217,7 +217,6 @@ class TimeItem extends Component { aux = event.target.value.replace(/\D/, ''); this.updateStyle(style, aux, max); this.setState({ value: aux }); - } else { } this.props.updateTime(aux, this.props.name, event); @@ -315,8 +314,7 @@ export class Time extends Component { constructor(props) { super(props); const { time } = this.props; - if (time.hour !== '00') { - } else { + if (time.hour === '00') { time.hour = this.props.format12Hours ? '12' : '00'; } this.state = {