From 33d0715f86ab84ad41f5f1ce4ef384fd00506aad Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 31 May 2024 14:27:07 +0100 Subject: [PATCH] Fix double pinned icon --- apps/remix-ide/src/app/components/vertical-icons.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/components/vertical-icons.tsx b/apps/remix-ide/src/app/components/vertical-icons.tsx index c46df20fda..c7b071b614 100644 --- a/apps/remix-ide/src/app/components/vertical-icons.tsx +++ b/apps/remix-ide/src/app/components/vertical-icons.tsx @@ -81,7 +81,13 @@ export class VerticalIcons extends Plugin { }) this.on('pinnedPanel', 'pinnedPlugin', (profile) => { - this.icons[profile.name].pinned = true + Object.keys(this.icons).map((icon) => { + if (this.icons[icon].profile.name === profile.name) { + this.icons[icon].pinned = true + } else { + this.icons[icon].pinned = false + } + }) this.renderComponent() })