Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix pinned tab not showing issue
Browse files Browse the repository at this point in the history
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 #8190

Auditors: @bbondy

Test Plan:
1. Pin multiple sites
2. Exit
3. Re-launch and verify sites are still pinned
  • Loading branch information
bsclifton committed Apr 11, 2017
1 parent d42842f commit 70ff720
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions js/state/frameStateUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

1 comment on commit 70ff720

@bbondy
Copy link
Member

@bbondy bbondy commented on 70ff720 Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ 💯

Please sign in to comment.