From 34bd8edd4258821feaad3ee7deb4afce4384e0b0 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 15 Aug 2012 21:45:24 -0300 Subject: [PATCH] Fix javascript error on map view. --- mindplot/src/main/javascript/widget/Menu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 55cb566d..9a87a477 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -243,14 +243,18 @@ mindplot.widget.Menu = new Class({ var undoButton = this._addButton('undoEdition', false, false, function () { designer.undo(); }); - undoButton.disable(); + if (undoButton) { + undoButton.disable(); + } this._registerTooltip('undoEdition', $msg('UNDO'), "meta+Z"); var redoButton = this._addButton('redoEdition', false, false, function () { designer.redo(); }); - redoButton.disable(); + if (redoButton) { + redoButton.disable(); + } this._registerTooltip('redoEdition', $msg('REDO'), "meta+shift+Z"); if (redoButton && undoButton) {