fix: oldObj values lost

This commit is contained in:
Vlad Stan
2022-11-23 17:04:08 +02:00
parent 28e35fb1ba
commit b9986b562a

View File

@@ -14,7 +14,7 @@ const retryWithDelay = async function (fn, retryCount = 0) {
}
const mapCharge = (obj, oldObj = {}) => {
const charge = _.clone(obj)
const charge = {...obj, ...oldObj}
charge.progress = obj.time_left < 0 ? 1 : 1 - obj.time_left / obj.time
charge.time = minutesToTime(obj.time)