diff --git a/mopidy_musicbox_webclient/static/js/controls.js b/mopidy_musicbox_webclient/static/js/controls.js index f4f11378..d8758a01 100644 --- a/mopidy_musicbox_webclient/static/js/controls.js +++ b/mopidy_musicbox_webclient/static/js/controls.js @@ -172,7 +172,7 @@ var pos = index if (pos === null) { pos = 0 - } else if (action !== INSERT_AT_INDEX) { + } else { pos += 1 } diff --git a/tests/js/test_controls.js b/tests/js/test_controls.js index 83c6dca1..39b515fb 100644 --- a/tests/js/test_controls.js +++ b/tests/js/test_controls.js @@ -310,7 +310,7 @@ describe('controls', function () { }) mopidy.tracklist.get_tl_tracks().then( function (tlTracks) { - assert.equal(tlTracks[1].track.uri, insertUri) + assert.equal(tlTracks[2].track.uri, insertUri) }) }) })