Moving lastLoad initialization before we start loading to avoid loading several times
This commit is contained in:
parent
82a1a5fc1e
commit
d8ecae64f0
@ -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();
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user