From 77cb7e366c7ab59530220afea6ce75158884f3a4 Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Mon, 10 Apr 2017 18:29:47 -0700 Subject: [PATCH] Fix pinned tab not showing issue At time addFrame is called, location isn't known which causes the check (which is removed by this commit) to only allow one pinned tab through (since url is undefined). The rest of the pinned tabs were dropped. This check is not needed. Realistically, our sites map already has unique keys and we only need to check if the pinned site is unique when a new one is added (check is in app/browser/tabs). Fixes https://github.com/brave/browser-laptop/issues/8190 Auditors: @bbondy Test Plan: 1. Pin multiple sites 2. Exit 3. Re-launch and verify sites are still pinned --- js/state/frameStateUtil.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/js/state/frameStateUtil.js b/js/state/frameStateUtil.js index 11c872611ce..6d38dfe3f3d 100644 --- a/js/state/frameStateUtil.js +++ b/js/state/frameStateUtil.js @@ -421,13 +421,6 @@ function addFrame (windowState, tabs, frameOpts, newKey, partitionNumber, active // Only add pin requests if it's not already added const isPinned = frameOpts.isPinned delete frameOpts.isPinned - if (isPinned) { - const alreadyPinnedFrameProps = frames.find((frame) => - frame.get('pinnedLocation') === location && frame.get('partitionNumber') === partitionNumber) - if (alreadyPinnedFrameProps) { - return {} - } - } // TODO: longer term get rid of parentFrameKey completely instead of // calculating it here.