Merge pull request #4633 from FinnStutzenstein/fixRequestingAllChanges

Fixed requesting all data after a connection lost
This commit is contained in:
Sean 2019-04-26 11:13:00 +02:00 committed by GitHub
commit 7c503024cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -142,8 +142,9 @@ export class AutoupdateService {
* The server should return an autoupdate with all new data.
*/
public requestChanges(): void {
console.log('requesting changed objects with DS max change id', this.DS.maxChangeId + 1);
this.websocketService.send('getElements', { change_id: this.DS.maxChangeId + 1 });
const changeId = this.DS.maxChangeId === 0 ? 0 : this.DS.maxChangeId + 1;
console.log(`requesting changed objects with DS max change id ${changeId}`);
this.websocketService.send('getElements', { change_id: changeId });
}
/**