From 8aa71e47412e0312e0ea1f9b935afaf8f0b4b280 Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Mon, 7 Feb 2022 13:23:48 +0100 Subject: [PATCH] [editor] Improve IDService to also reset the internal ID counter --- projects/editor/src/app/services/id.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/editor/src/app/services/id.service.ts b/projects/editor/src/app/services/id.service.ts index dadadf02e..ebce16ba6 100644 --- a/projects/editor/src/app/services/id.service.ts +++ b/projects/editor/src/app/services/id.service.ts @@ -65,6 +65,9 @@ export class IdService { // TODO rename: capitalize } reset(): void { + Object.keys(this.idCounter).forEach(counter => { + this.idCounter[counter] = 0; + }); this.givenIDs = []; } } -- GitLab