From 8fcdad104bba185cabb89f380e5071d5516428c7 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Sun, 3 May 2026 09:54:56 +0200 Subject: [PATCH] Fix history fromJSON when json.redos is not empty --- src/lib/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/history.js b/src/lib/history.js index 073560da3..e96c90834 100644 --- a/src/lib/history.js +++ b/src/lib/history.js @@ -142,7 +142,7 @@ export class History { for (let i = 0; i < json.redos.length; i++) { const cmdJSON = json.redos[i]; - const cmd = new commandsByType.get[cmdJSON.type](this.editor); // creates a new object of type "json.type" + const cmd = new commandsByType.get(cmdJSON.type)(this.editor); // creates a new object of type "json.type" cmd.json = cmdJSON; cmd.id = cmdJSON.id; cmd.name = cmdJSON.name;