Web: refactoring
This commit is contained in:
parent
772fa1d3dc
commit
2bfc53b881
@ -23,25 +23,18 @@ class SecondaryProgressDataStore {
|
||||
|
||||
if (progressIndex !== -1) {
|
||||
this.secondaryOperationsArray[progressIndex] = secondaryProgressData;
|
||||
}
|
||||
|
||||
if (progressIndex === 0) {
|
||||
const progressDataItems = Object.keys(secondaryProgressData);
|
||||
for (let key of progressDataItems) {
|
||||
if (key in this) {
|
||||
this[key] = secondaryProgressData[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.secondaryOperationsArray.length === 0) {
|
||||
const progressDataItems = Object.keys(secondaryProgressData);
|
||||
for (let key of progressDataItems) {
|
||||
if (key in this) {
|
||||
this[key] = secondaryProgressData[key];
|
||||
}
|
||||
if (progressIndex === 0 || this.secondaryOperationsArray.length === 0) {
|
||||
const progressDataItems = Object.keys(secondaryProgressData);
|
||||
for (let key of progressDataItems) {
|
||||
if (key in this) {
|
||||
this[key] = secondaryProgressData[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (progressIndex === -1) {
|
||||
this.secondaryOperationsArray.push(secondaryProgressData);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user