Fix sonarjs no-duplicated-branches
This commit is contained in:
parent
ad5c1ab018
commit
554cd1210c
8 changed files with 21 additions and 54 deletions
|
@ -61,31 +61,20 @@ function fetchData(instance) {
|
|||
|
||||
function onTimerChangedExternally(e, apiClient, data) {
|
||||
const options = this.options;
|
||||
let refresh = false;
|
||||
|
||||
if (data.Id && this.TimerId === data.Id) {
|
||||
refresh = true;
|
||||
} else if (data.ProgramId && options && options.programId === data.ProgramId) {
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if (refresh) {
|
||||
if ((data.Id && this.TimerId === data.Id)
|
||||
|| (data.ProgramId && options && options.programId === data.ProgramId)
|
||||
) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
function onSeriesTimerChangedExternally(e, apiClient, data) {
|
||||
const options = this.options;
|
||||
let refresh = false;
|
||||
|
||||
if (data.Id && this.SeriesTimerId === data.Id) {
|
||||
refresh = true;
|
||||
}
|
||||
if (data.ProgramId && options && options.programId === data.ProgramId) {
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if (refresh) {
|
||||
if ((data.Id && this.SeriesTimerId === data.Id)
|
||||
|| (data.ProgramId && options && options.programId === data.ProgramId)
|
||||
) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue