fix(timer): update time offset edge case

Prevents the client from updating its time offset when the time returned
from the server is zero, which is the default returned value when there
is no userId.
This would make the client to calculate a gigantic negative time offset
leading the timer to reach the end prematurely/instantaneously.
This commit is contained in:
Arthurk12 2023-04-12 16:49:45 -03:00
parent 0659f15211
commit 215fe73542

View File

@ -121,6 +121,7 @@ const fetchTimeOffset = () => {
const t0 = Date.now();
makeCall('getServerTime').then(result => {
if (result == 0) return;
const t3 = Date.now();
const ts = result;