From bd3dc96caf8341491a581718f3d9884af8d29105 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 29 Mar 2016 03:39:23 +0300 Subject: [PATCH] minor fixes... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/core.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui (gen4)/features/core.js b/ui (gen4)/features/core.js index afa12b78..d4c7ad2d 100755 --- a/ui (gen4)/features/core.js +++ b/ui (gen4)/features/core.js @@ -292,7 +292,9 @@ var WorkspaceActions = actions.Actions({ // XXX for some reason this does not get saved with .config... saveWorkspace: ['Workspace/Save Workspace', function(name){ - this.config['workspaces'] = this.config['workspaces'] + if(!this.config.hasOwnProperty('workspaces')){ + this.config['workspaces'] = JSON.parse(JSON.stringify(this.config['workspaces'])) + } var res = {} @@ -307,11 +309,13 @@ var WorkspaceActions = actions.Actions({ // specific way to do stuff... loadWorkspace: ['Workspace/Load Workspace', function(name){ + name = name || this.config.workspace + // get a workspace by name and load it... if(typeof(name) == typeof('str')){ this.config.workspace = name - return this.config['workspaces'][name || this.config.workspace] || {} + return this.config['workspaces'][name] || {} // we got the workspace object... } else {