Fix comparison

This commit is contained in:
Dan Simon 2021-08-16 10:16:04 -04:00
parent efbb77b82f
commit b002c88e37

View File

@ -37,27 +37,32 @@ const Cloud = {
};
const firstInfo = getSaveInfo(first);
const secondInfo = getSaveInfo(second);
if (
firstInfo.realities === secondInfo.realities &&
firstInfo.eternities.eq(secondInfo.eternities) &&
firstInfo.infinities.eq(secondInfo.infinities)
) {
return undefined;
}
if (firstInfo.realities > secondInfo.realities) {
return first;
}
if (firstInfo.realities < secondInfo.realities) {
return second;
}
if (firstInfo.eternities.gt(secondInfo.eternities)) {
return first;
}
if (firstInfo.eternities.lt(secondInfo.eternities)) {
return second;
}
if (firstInfo.infinities.gt(secondInfo.infinities)) {
return first;
}
return second;
if (firstInfo.infinities.lt(secondInfo.infinities)) {
return second;
}
return undefined;
},
async loadMobile() {