diff options
author | bobzel <zzzman@gmail.com> | 2024-04-24 18:12:30 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-24 18:12:30 -0400 |
commit | b1376d401e709515cee078cc08b05fd3fb89caeb (patch) | |
tree | d9ed253a539d506589a6c4251b9598dd5d0111f7 /src/client/util/PingManager.ts | |
parent | aa4f7b37483c516b92181d3374d3151972b98383 (diff) |
completing eslint pass
Diffstat (limited to 'src/client/util/PingManager.ts')
-rw-r--r-- | src/client/util/PingManager.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/PingManager.ts b/src/client/util/PingManager.ts index 7638e2ce0..e5e69c5ac 100644 --- a/src/client/util/PingManager.ts +++ b/src/client/util/PingManager.ts @@ -1,8 +1,10 @@ import { action, makeObservable, observable, runInAction } from 'mobx'; import { Networking } from '../Network'; import { CurrentUserUtils } from './CurrentUserUtils'; + export class PingManager { // create static instance and getter for global use + // eslint-disable-next-line no-use-before-define @observable static _instance: PingManager; @observable IsBeating = true; static get Instance(): PingManager { @@ -29,7 +31,9 @@ export class PingManager { sendPing = async (): Promise<void> => { try { const res = await Networking.PostToServer('/ping', { date: new Date() }); - runInAction(() => (CurrentUserUtils.ServerVersion = res.message)); + runInAction(() => { + CurrentUserUtils.ServerVersion = res.message; + }); !this.IsBeating && this.setIsBeating(true); } catch { if (this.IsBeating) { |