minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-03-29 03:39:23 +03:00
parent 30205b33c5
commit bd3dc96caf

View File

@ -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 {