Fix eslint errors
This commit is contained in:
parent
ab7ccb6fb6
commit
734b43333f
1 changed files with 2 additions and 2 deletions
|
@ -283,12 +283,12 @@ const backgroundLogic = {
|
||||||
for (const difference of differ.diff(beforeIds, afterIds)) {
|
for (const difference of differ.diff(beforeIds, afterIds)) {
|
||||||
if (!difference.added)
|
if (!difference.added)
|
||||||
continue;
|
continue;
|
||||||
let movingIds = difference.value;
|
const movingIds = difference.value;
|
||||||
const nearestFollowingIndex = afterIds.indexOf(movingIds[movingIds.length - 1]) + 1;
|
const nearestFollowingIndex = afterIds.indexOf(movingIds[movingIds.length - 1]) + 1;
|
||||||
let newIndex = nearestFollowingIndex < afterIds.length ? sortedIds.indexOf(afterIds[nearestFollowingIndex]) : -1;
|
let newIndex = nearestFollowingIndex < afterIds.length ? sortedIds.indexOf(afterIds[nearestFollowingIndex]) : -1;
|
||||||
if (newIndex < 0)
|
if (newIndex < 0)
|
||||||
newIndex = beforeIds.length;
|
newIndex = beforeIds.length;
|
||||||
let oldIndices = movingIds.map(id => sortedIds.indexOf(id));
|
const oldIndices = movingIds.map(id => sortedIds.indexOf(id));
|
||||||
if (oldIndices[0] < newIndex)
|
if (oldIndices[0] < newIndex)
|
||||||
newIndex--;
|
newIndex--;
|
||||||
browser.tabs.move(movingIds, {
|
browser.tabs.move(movingIds, {
|
||||||
|
|
Loading…
Add table
Reference in a new issue