Skip to content

Commit

Permalink
PoAlternative to flatMap for ESR support
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegnat committed Sep 8, 2019
1 parent b025a48 commit 7725063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function getWindowsSorted (populate = false) {
* @param {number} active Tab ID of the active tab after merge
*/
function merge (subjects, target, active) {
const tabs = subjects.flatMap(window => window.tabs)
const tabs = subjects.reduce((flat, window) => flat.concat(window.tabs), [])
Promise
.all(tabs.filter(tab => tab.pinned).map(tab => browser.tabs.update(tab.id, { pinned: false })))
.then(unpinned => {
Expand Down

0 comments on commit 7725063

Please sign in to comment.