changed strange IIFE function
This commit is contained in:
@@ -114,25 +114,27 @@ const Profile = observer (() => {
|
|||||||
registrationStore.pushAccountData(changeData);
|
registrationStore.pushAccountData(changeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeDataParameters = () => {
|
const changeInitialArray = () => {
|
||||||
const updatedData = (function changeValue() {
|
let newArr = [];
|
||||||
let newArr = []
|
userDataStore.decryptedData.map(elem => {
|
||||||
userDataStore.decryptedData.map(elem => {
|
updatedValues.forEach(item => {
|
||||||
updatedValues.forEach(item => {
|
if (elem.label === item.label) {
|
||||||
if (elem.label === item.label) {
|
newArr.push({
|
||||||
newArr.push({
|
...elem,
|
||||||
...elem,
|
'value': item.value,
|
||||||
'value': item.value,
|
'seed': item.seed,
|
||||||
'seed': item.seed,
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (!newArr.find(element => element.label === elem.label)) {
|
|
||||||
newArr.push(elem);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return newArr
|
if (!newArr.find(element => element.label === elem.label)) {
|
||||||
})();
|
newArr.push(elem);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return newArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeDataParameters = () => {
|
||||||
|
const updatedData = changeInitialArray();
|
||||||
registrationStore.pushAccountData(updatedData);
|
registrationStore.pushAccountData(updatedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user