Merge branch 'master' of https://github.com/ethereum/remix-project into fastcircle

pull/1754/head
filip mertens 3 years ago
commit 438404e915
  1. 10
      apps/remix-ide/src/app/panels/tab-proxy.js

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

Loading…
Cancel
Save