diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js index b443c7cf77..93bb1ce07b 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js @@ -92,13 +92,16 @@ Ext.onReady(function(){ // adds a tab to main TabPanel function addTabPanel(id, xtype, title){ - mainTabPanel.add({ - id: id, - xtype: xtype, - title: title, - closable: true, - autoScroll: true - }); + var tab = mainTabPanel.findById( id ); + if ( tab == null ){ + mainTabPanel.add({ + id: id, + xtype: xtype, + title: title, + closable: true, + autoScroll: true + }); + } mainTabPanel.setActiveTab(id); }