Преглед на файлове

Editor: Add missing editor paramter to command creation.

Mugen87 преди 5 години
родител
ревизия
1126953f67
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      editor/js/History.js

+ 2 - 2
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;