Refactor getInstance() methods

This commit is contained in:
redphx
2024-10-14 16:56:05 +07:00
parent 9f440e9cf4
commit 927eae3f2f
12 changed files with 14 additions and 82 deletions

View File

@@ -37,13 +37,7 @@ type RemotePlayConsole = {
export class RemotePlayManager {
private static instance: RemotePlayManager;
public static getInstance(): RemotePlayManager {
if (!this.instance) {
this.instance = new RemotePlayManager();
}
return this.instance;
}
public static getInstance = () => RemotePlayManager.instance ?? (RemotePlayManager.instance = new RemotePlayManager());
private isInitialized = false;