提交 1126953f 编写于 作者: M Mugen87

Editor: Add missing editor paramter to command creation.

上级 ad2606b1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册