Browse Source

Fixed bug when the 'more tabs' icons were deleted from its parent but never attached

Temechon 8 years ago
parent
commit
559e4352aa

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js


+ 3 - 1
dist/preview release/inspector/babylon.inspector.js

@@ -2794,7 +2794,9 @@ var INSPECTOR;
                     this._div.appendChild(lastTab.toHtml());
                     this._div.appendChild(lastTab.toHtml());
                     this._visibleTabs.push(lastTab);
                     this._visibleTabs.push(lastTab);
                     // Update more-tab icon in last position if needed
                     // Update more-tab icon in last position if needed
-                    this._div.removeChild(this._moreTabsIcon);
+                    if (this._div.contains(this._moreTabsIcon)) {
+                        this._div.removeChild(this._moreTabsIcon);
+                    }
                 }
                 }
             }
             }
             if (this._invisibleTabs.length > 0 && !this._div.contains(this._moreTabsIcon)) {
             if (this._invisibleTabs.length > 0 && !this._div.contains(this._moreTabsIcon)) {

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/inspector/babylon.inspector.min.js


+ 3 - 1
inspector/src/tabs/TabBar.ts

@@ -180,7 +180,9 @@ module INSPECTOR {
                     this._div.appendChild(lastTab.toHtml());
                     this._div.appendChild(lastTab.toHtml());
                     this._visibleTabs.push(lastTab);
                     this._visibleTabs.push(lastTab);
                     // Update more-tab icon in last position if needed
                     // Update more-tab icon in last position if needed
-                    this._div.removeChild(this._moreTabsIcon);
+                     if (this._div.contains(this._moreTabsIcon)) {
+                        this._div.removeChild(this._moreTabsIcon);
+                     }
                 }
                 }
             }
             }
             if (this._invisibleTabs.length > 0 && !this._div.contains(this._moreTabsIcon)) {
             if (this._invisibleTabs.length > 0 && !this._div.contains(this._moreTabsIcon)) {