Skip to content

Commit

Permalink
regression: fix getServerTimeSync return (#5726)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlsilva authored and diegolmello committed Jun 6, 2024
1 parent 8677bd7 commit 4275a8d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/lib/services/getServerTimeSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ export const getServerTimeSync = async (server: string) => {
try {
const response = await Promise.race([fetch(`${server}/_timesync`), new Promise<undefined>(res => setTimeout(res, 2000))]);
const data = await response?.json();
if (data?.data) {
return parseInt(data.data);
}
if (data) return parseInt(data);
return null;
} catch {
return null;
Expand Down

0 comments on commit 4275a8d

Please sign in to comment.