forked from p15670423/monkey
ui: fix some code cleanliness issues
This commit is contained in:
parent
06685b14cf
commit
57554ca435
|
@ -104,7 +104,7 @@ class AdvancedMultiSelect extends React.Component {
|
||||||
return MasterCheckboxState.NONE;
|
return MasterCheckboxState.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectValues.length != this.enumOptions.length) {
|
if (selectValues.length !== this.enumOptions.length) {
|
||||||
return MasterCheckboxState.MIXED;
|
return MasterCheckboxState.MIXED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ class AdvancedMultiSelect extends React.Component {
|
||||||
title: definitionObj.title,
|
title: definitionObj.title,
|
||||||
content: definitionObj.info,
|
content: definitionObj.info,
|
||||||
link: definitionObj.link,
|
link: definitionObj.link,
|
||||||
warningType: !(this.isSafe(itemKey)) ? WarningType.SINGLE : WarningType.NONE
|
warningType: this.isSafe(itemKey) ? WarningType.NONE : WarningType.SINGLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -62,7 +62,7 @@ function getSubtitle(props) {
|
||||||
function getBody(props) {
|
function getBody(props) {
|
||||||
let body = [<span key={'body'}>{props.body}</span>];
|
let body = [<span key={'body'}>{props.body}</span>];
|
||||||
|
|
||||||
if (props.warningType != WarningType.NONE) {
|
if (props.warningType !== WarningType.NONE) {
|
||||||
body.push(getWarning(props.warningType));
|
body.push(getWarning(props.warningType));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ function getBody(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWarning(warningType) {
|
function getWarning(warningType) {
|
||||||
if (warningType == WarningType.SINGLE) {
|
if (warningType === WarningType.SINGLE) {
|
||||||
var warning = <span>This option may cause a system to become unstable or
|
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
|
may change a system's state in undesirable ways. Therefore, this option
|
||||||
is not recommended for use in production or other sensitive
|
is not recommended for use in production or other sensitive
|
||||||
|
|
Loading…
Reference in New Issue