ui: fix some code cleanliness issues

This commit is contained in:
Mike Salvatore 2021-01-29 11:02:54 -05:00
parent 06685b14cf
commit 57554ca435
2 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ class AdvancedMultiSelect extends React.Component {
return MasterCheckboxState.NONE;
}
if (selectValues.length != this.enumOptions.length) {
if (selectValues.length !== this.enumOptions.length) {
return MasterCheckboxState.MIXED;
}
@ -144,7 +144,7 @@ class AdvancedMultiSelect extends React.Component {
title: definitionObj.title,
content: definitionObj.info,
link: definitionObj.link,
warningType: !(this.isSafe(itemKey)) ? WarningType.SINGLE : WarningType.NONE
warningType: this.isSafe(itemKey) ? WarningType.NONE : WarningType.SINGLE
}
}
);

View File

@ -62,7 +62,7 @@ function getSubtitle(props) {
function getBody(props) {
let body = [<span key={'body'}>{props.body}</span>];
if (props.warningType != WarningType.NONE) {
if (props.warningType !== WarningType.NONE) {
body.push(getWarning(props.warningType));
}
@ -74,7 +74,7 @@ function getBody(props) {
}
function getWarning(warningType) {
if (warningType == WarningType.SINGLE) {
if (warningType === WarningType.SINGLE) {
var warning = <span>This option may cause a system to become unstable or
may change a system's state in undesirable ways. Therefore, this option
is not recommended for use in production or other sensitive