From e0fab951e4f3869b04fd4a01f429a6654991cd68 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 28 Feb 2012 15:33:35 -0800 Subject: minor fixes in saving undo/redo stacks per document Signed-off-by: Ananya Sen --- js/controllers/undo-controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/undo-controller.js b/js/controllers/undo-controller.js index 01853593..19cfb6e6 100755 --- a/js/controllers/undo-controller.js +++ b/js/controllers/undo-controller.js @@ -71,7 +71,7 @@ exports.UndoController = Montage.create( Component, { /** * Undo Queue */ - _undoQueue: { value: [], writable:true }, + _undoQueue: { value: []}, undoQueue: { get: function() { @@ -85,7 +85,7 @@ exports.UndoController = Montage.create( Component, { /** * Redo Queue */ - _redoQueue: { value: [], enumerable: false, writable:true }, + _redoQueue: { value: [], enumerable: false}, redoQueue: { get: function() { @@ -212,8 +212,8 @@ exports.UndoController = Montage.create( Component, { clearHistory:{ value: function(){ - this.undoQueue.splice(0, this.undoQueue.length); - this.redoQueue.splice(0, this.redoQueue.length); + this.undoQueue.length = 0; + this.redoQueue.length = 0; } } }); \ No newline at end of file -- cgit v1.2.3