Skip to content

Commit

Permalink
Update background.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Jul 17, 2021
1 parent 3df645d commit c4008b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ function moveIt(tab, event) {
if (Number.isInteger(currentIndex[tab.windowId])) {
const moveToIndex = currentIndex[tab.windowId] + 1;
currentIndex[tab.windowId] = moveToIndex;

if (tab.index === moveToIndex) {
console.log(tab.windowId + ': tabs.' + event + ' - tab.index: ' + tab.index + ' === moveToIndex: ' + moveToIndex + ' (nothing to do)');

return;
}

chrome.tabs.move(tab.id, {
index: moveToIndex
});
Expand Down

0 comments on commit c4008b2

Please sign in to comment.