Fix sonarjs no-collapsible-if

This commit is contained in:
Bill Thornton 2022-10-03 14:22:02 -04:00
parent ccdbf0bfc3
commit 1f4e65822b
33 changed files with 330 additions and 473 deletions

View file

@ -63,15 +63,10 @@ function onTimerChangedExternally(e, apiClient, data) {
const options = this.options;
let refresh = false;
if (data.Id) {
if (this.TimerId === data.Id) {
refresh = true;
}
}
if (data.ProgramId && options) {
if (options.programId === data.ProgramId) {
refresh = true;
}
if (data.Id && this.TimerId === data.Id) {
refresh = true;
} else if (data.ProgramId && options && options.programId === data.ProgramId) {
refresh = true;
}
if (refresh) {
@ -83,15 +78,11 @@ function onSeriesTimerChangedExternally(e, apiClient, data) {
const options = this.options;
let refresh = false;
if (data.Id) {
if (this.SeriesTimerId === data.Id) {
refresh = true;
}
if (data.Id && this.SeriesTimerId === data.Id) {
refresh = true;
}
if (data.ProgramId && options) {
if (options.programId === data.ProgramId) {
refresh = true;
}
if (data.ProgramId && options && options.programId === data.ProgramId) {
refresh = true;
}
if (refresh) {