Moving lastLoad initialization before we start loading to avoid loading several times

This commit is contained in:
David Négrier 2021-11-23 09:34:39 +01:00
parent 82a1a5fc1e
commit d8ecae64f0

View File

@ -485,9 +485,9 @@ export class GameRoom {
private getVariableManager(): Promise<VariablesManager> { private getVariableManager(): Promise<VariablesManager> {
if (!this.variableManagerPromise) { if (!this.variableManagerPromise) {
this.variableManagerLastLoad = new Date();
this.variableManagerPromise = this.getMap() this.variableManagerPromise = this.getMap()
.then((map) => { .then((map) => {
this.variableManagerLastLoad = new Date();
const variablesManager = new VariablesManager(this.roomUrl, map); const variablesManager = new VariablesManager(this.roomUrl, map);
return variablesManager.init(); return variablesManager.init();
}) })