Korjaa Tietokanta.kumoa():n paluuarvo tapauksessa, jossa ei ole kumottavaa

This commit is contained in:
Juhani Krekelä 2024-05-17 15:43:37 +03:00
parent 82b03d8d48
commit 049c9a2533
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class Tietokanta {
kumoa() {
if (this.historia.length === 0) {
return [];
return [this, []];
}
const {muutokset, idMuutos} = this.historia.pop();
this.seuraavaId -= idMuutos;