Skip to content

Commit 1757543

Browse files
committed
Set show to true if tab is loaded
1 parent e9b7b0d commit 1757543

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/remix-ide/src/app/panels/tab-proxy.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ export default class TabProxy extends Plugin {
211211

212212
focus (name) {
213213
this.emit('switchApp', name)
214-
this.loadedTabs.find(tab => tab.name === name).show = true
214+
const tabIndex = this.loadedTabs.findIndex(tab => tab.name === name)
215+
if (tabIndex !== -1) {
216+
this.loadedTabs[tabIndex].show = true
217+
}
215218
this.tabsApi.activateTab(name)
216219
}
217220

0 commit comments

Comments
 (0)