mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix switching projects
This commit is contained in:
		@@ -2384,7 +2384,6 @@ RED.nodes = (function() {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function clear() {
 | 
			
		||||
        allNodes.clear();
 | 
			
		||||
        links = [];
 | 
			
		||||
        linkTabMap = {};
 | 
			
		||||
        nodeLinks = {};
 | 
			
		||||
@@ -2405,6 +2404,8 @@ RED.nodes = (function() {
 | 
			
		||||
        initialLoad = null;
 | 
			
		||||
        workspaces = {};
 | 
			
		||||
 | 
			
		||||
        allNodes.clear();
 | 
			
		||||
 | 
			
		||||
        RED.nodes.dirty(false);
 | 
			
		||||
        RED.view.redraw(true, true);
 | 
			
		||||
        RED.palette.refresh();
 | 
			
		||||
 
 | 
			
		||||
@@ -251,6 +251,9 @@ var RED = (function() {
 | 
			
		||||
                        if (/^#flow\/.+$/.test(currentHash)) {
 | 
			
		||||
                            RED.workspaces.show(currentHash.substring(6),true);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (RED.workspaces.active() === 0 && RED.workspaces.count() > 0) {
 | 
			
		||||
                            RED.workspaces.show(RED.nodes.getWorkspaceOrder()[0])
 | 
			
		||||
                        }
 | 
			
		||||
                    } catch(err) {
 | 
			
		||||
                        console.warn(err);
 | 
			
		||||
                        RED.notify(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user