fix tabs appearing twice

pull/1750/head
yann300 3 years ago committed by GitHub
parent c94ca5a2ec
commit c1eb48dd98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      apps/remix-ide/src/app/panels/tab-proxy.js

@ -227,22 +227,6 @@ export class TabProxy extends Plugin {
tooltip: name,
iconClass: helper.getPathIcon(name)
})
formatPath.shift()
if (formatPath.length > 0) {
const duplicateTabName = this.loadedTabs.find(({ title }) => title === formatPath.join('/')).name
const duplicateTabPath = duplicateTabName.split('/')
const duplicateTabFormatPath = [...duplicateTabPath].reverse()
const duplicateTabTitle = duplicateTabFormatPath.slice(0, titleLength).reverse().join('/')
this.loadedTabs.push({
id: duplicateTabName,
name: duplicateTabName,
title: duplicateTabTitle,
icon,
tooltip: duplicateTabName,
iconClass: helper.getPathIcon(duplicateTabName)
})
}
break
}
}

Loading…
Cancel
Save