Only set config hash if present in update response
Prevents infinite reloading if the update response doesn't contain a hash for some reason
This commit is contained in:
parent
ac806a3a6b
commit
6aa9aaf2bd
@ -717,7 +717,10 @@ export default class DynmapMapProvider extends MapProvider {
|
|||||||
this.store.commit(MutationTypes.ADD_MARKER_SET_UPDATES, updates.markerSets);
|
this.store.commit(MutationTypes.ADD_MARKER_SET_UPDATES, updates.markerSets);
|
||||||
this.store.commit(MutationTypes.ADD_TILE_UPDATES, updates.tiles);
|
this.store.commit(MutationTypes.ADD_TILE_UPDATES, updates.tiles);
|
||||||
this.store.commit(MutationTypes.ADD_CHAT, updates.chat);
|
this.store.commit(MutationTypes.ADD_CHAT, updates.chat);
|
||||||
this.store.commit(MutationTypes.SET_SERVER_CONFIGURATION_HASH, response.confighash || 0);
|
|
||||||
|
if(response.configHash) {
|
||||||
|
this.store.commit(MutationTypes.SET_SERVER_CONFIGURATION_HASH, response.confighash || 0);
|
||||||
|
}
|
||||||
|
|
||||||
await this.store.dispatch(ActionTypes.SET_PLAYERS, players);
|
await this.store.dispatch(ActionTypes.SET_PLAYERS, players);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user