Fix eslint errors

This commit is contained in:
YUKI "Piro" Hiroshi 2019-04-19 01:03:39 +09:00 committed by GitHub
parent ab7ccb6fb6
commit 734b43333f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -283,12 +283,12 @@ const backgroundLogic = {
for (const difference of differ.diff(beforeIds, afterIds)) {
if (!difference.added)
continue;
let movingIds = difference.value;
const movingIds = difference.value;
const nearestFollowingIndex = afterIds.indexOf(movingIds[movingIds.length - 1]) + 1;
let newIndex = nearestFollowingIndex < afterIds.length ? sortedIds.indexOf(afterIds[nearestFollowingIndex]) : -1;
if (newIndex < 0)
newIndex = beforeIds.length;
let oldIndices = movingIds.map(id => sortedIds.indexOf(id));
const oldIndices = movingIds.map(id => sortedIds.indexOf(id));
if (oldIndices[0] < newIndex)
newIndex--;
browser.tabs.move(movingIds, {