From 2a73c194ddcb62005f3006d5df887c8ddd703a1f Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 26 Apr 2019 09:51:44 +0200 Subject: [PATCH] Fixed requesting all data after a connection lost --- client/src/app/core/core-services/autoupdate.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/app/core/core-services/autoupdate.service.ts b/client/src/app/core/core-services/autoupdate.service.ts index 68d5728fd..f47c7e003 100644 --- a/client/src/app/core/core-services/autoupdate.service.ts +++ b/client/src/app/core/core-services/autoupdate.service.ts @@ -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 }); } /**