Add undefined check to updateProfileBaseStats()
This commit is contained in:
parent
0e3d25df03
commit
1f90ae0bb0
@ -151,6 +151,13 @@ export class InRaidHelper
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const postRaidValue = saveProgressRequest.profile.BackendCounters[backendCounterKey]?.value;
|
||||||
|
if (typeof postRaidValue === "undefined")
|
||||||
|
{
|
||||||
|
// No value, skip
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const matchingPreRaidCounter = profileData.BackendCounters[backendCounterKey];
|
const matchingPreRaidCounter = profileData.BackendCounters[backendCounterKey];
|
||||||
if (!matchingPreRaidCounter)
|
if (!matchingPreRaidCounter)
|
||||||
{
|
{
|
||||||
@ -159,9 +166,9 @@ export class InRaidHelper
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchingPreRaidCounter.value !== saveProgressRequest.profile.BackendCounters[backendCounterKey].value)
|
if (matchingPreRaidCounter.value !== postRaidValue)
|
||||||
{
|
{
|
||||||
this.logger.error(`Backendcounter: ${backendCounterKey} value is different post raid, old: ${matchingPreRaidCounter.value} new: ${saveProgressRequest.profile.BackendCounters[backendCounterKey].value}`);
|
this.logger.error(`Backendcounter: ${backendCounterKey} value is different post raid, old: ${matchingPreRaidCounter.value} new: ${postRaidValue}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user