From 1126953f672e0e6904d15d1fc19f9ba283562ed4 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Wed, 5 Feb 2020 11:04:33 +0100 Subject: [PATCH] Editor: Add missing editor paramter to command creation. --- editor/js/History.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/js/History.js b/editor/js/History.js index c2ca6f80ae..2c43929840 100644 --- a/editor/js/History.js +++ b/editor/js/History.js @@ -204,7 +204,7 @@ History.prototype = { for ( var i = 0; i < json.undos.length; i ++ ) { var cmdJSON = json.undos[ i ]; - var cmd = new Commands[ cmdJSON.type ](); // creates a new object of type "json.type" + var cmd = new Commands[ cmdJSON.type ]( this.editor ); // creates a new object of type "json.type" cmd.json = cmdJSON; cmd.id = cmdJSON.id; cmd.name = cmdJSON.name; @@ -216,7 +216,7 @@ History.prototype = { for ( var i = 0; i < json.redos.length; i ++ ) { var cmdJSON = json.redos[ i ]; - var cmd = new Commands[ cmdJSON.type ](); // creates a new object of type "json.type" + var cmd = new Commands[ cmdJSON.type ]( this.editor ); // creates a new object of type "json.type" cmd.json = cmdJSON; cmd.id = cmdJSON.id; cmd.name = cmdJSON.name; -- GitLab