Browse Source

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

Temechon 8 năm trước cách đây
mục cha
commit
559e4352aa

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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._visibleTabs.push(lastTab);
                     // 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)) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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._visibleTabs.push(lastTab);
                     // 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)) {