diff --git a/src/common/globals.js b/src/common/globals.js index 24f360792..63a7ea102 100644 --- a/src/common/globals.js +++ b/src/common/globals.js @@ -102,6 +102,10 @@ define([ DeepForge.places = {}; // Create a territory + if (placesTerritoryId) { + client.removeUI(placesTerritoryId); + } + territory[CONSTANTS.PROJECT_ROOT_ID] = {children: 1}; placesTerritoryId = client.addUI(null, updateDeepForgePlaces); @@ -126,6 +130,7 @@ define([ // Remove the territory client.removeUI(placesTerritoryId); + placesTerritoryId = null; }; // Add DeepForge action primitives