1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix the problem that the last flow tab can be deleted

This commit is contained in:
Kazuki-Nakanishi 2018-02-07 14:19:18 +09:00
parent 8d98b228ab
commit c316284924

View File

@ -333,7 +333,9 @@ RED.tabs = (function() {
previousTab: activatePreviousTab, previousTab: activatePreviousTab,
resize: updateTabWidths, resize: updateTabWidths,
count: function() { count: function() {
return ul.find("li.red-ui-tab").size(); var numOfTabs = ul.find("li.red-ui-tab").size();
var numOfSubflow = ul.find('img[src="red/images/subflow_tab.png"]').size();
return numOfTabs - numOfSubflow;
}, },
contains: function(id) { contains: function(id) {
return ul.find("a[href='#"+id+"']").length > 0; return ul.find("a[href='#"+id+"']").length > 0;