diff --git a/lib/client/menu.js b/lib/client/menu.js index 0b4e6e19..25015826 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -22,12 +22,20 @@ CloudCommander.Menu.getConfig = (function(){ foo: {name: "View", callback: function(key, opt){ if(typeof CloudCommander.Viewer === 'function') CloudCommander.Viewer(); - else CloudCommander.Viewer.show(); + else{ + var lViewer = CloudCommander.Viewer.get(); + if(lViewer && lViewer.show) + lViewer.show() + } }}, bar: {name: "Edit", callback: function(key, opt){ if(typeof CloudCommander.Editor === 'function') CloudCommander.Editor(); - else CloudCommander.Editor.show(); + else{ + var lEditor = CloudCommander.Editor.get(); + if(lEditor && lEditor.show) + lEditor.show() + } }} }