added error correction

This commit is contained in:
Jack 2021-11-04 19:24:27 +00:00
parent b1705cac6b
commit ac1601bfdd

View file

@ -114,7 +114,8 @@ module.exports = {
//updating lbpersonalbests object
//verify structure first
if (lbObj[mode] === undefined) lbObj[mode] = {};
if (lbObj[mode][mode2] === undefined) lbObj[mode][mode2] = {};
if (lbObj[mode][mode2] === undefined || Array.isArray(lbObj[mode][mode2]))
lbObj[mode][mode2] = {};
let bestForEveryLanguage = {};
if (obj?.[mode]?.[mode2]) {