Skip to content

Commit

Permalink
fix react warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed May 21, 2019
1 parent 141c64c commit fbc229d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ const ThresholdWatchEditUi = ({ intl, pageTitle }: { intl: InjectedIntl; pageTit
.join(` ${andThresholdText} `)}
isActive={
watchThresholdPopoverOpen ||
errors.threshold0.length ||
(errors.threshold1 && errors.threshold1.length)
!!errors.threshold0.length ||
(errors.threshold1 && !!errors.threshold1.length)
}
onClick={() => {
setWatchThresholdPopoverOpen(true);
Expand Down Expand Up @@ -707,6 +707,7 @@ const ThresholdWatchEditUi = ({ intl, pageTitle }: { intl: InjectedIntl; pageTit
className="watcherThresholdWatchInBetweenComparatorText"
>
<EuiText>{andThresholdText}</EuiText>
{hasErrors && <EuiSpacer />}
</EuiFlexItem>
) : null}
<EuiFlexItem grow={false}>
Expand All @@ -716,7 +717,7 @@ const ThresholdWatchEditUi = ({ intl, pageTitle }: { intl: InjectedIntl; pageTit
errors={errors}
>
<EuiFieldNumber
value={watch.threshold[i]}
value={watch.threshold[i] || ''}
min={1}
onChange={e => {
const { value } = e.target;
Expand Down

0 comments on commit fbc229d

Please sign in to comment.