From 049c9a2533a19328617d74808d34a0ab4b23d960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Fri, 17 May 2024 15:43:37 +0300 Subject: [PATCH] Korjaa Tietokanta.kumoa():n paluuarvo tapauksessa, jossa ei ole kumottavaa --- tietokanta.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tietokanta.js b/tietokanta.js index 6f18ac6..781dd03 100644 --- a/tietokanta.js +++ b/tietokanta.js @@ -111,7 +111,7 @@ class Tietokanta { kumoa() { if (this.historia.length === 0) { - return []; + return [this, []]; } const {muutokset, idMuutos} = this.historia.pop(); this.seuraavaId -= idMuutos;