Skip to content

Commit

Permalink
Fixing moving items in playlists (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyes-0nly authored Feb 17, 2021
1 parent edd94a4 commit 2f7c243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/playlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ class PlaylistsRepository {

const newMedia = itemsInPlaylist.filter((item) => !itemIDsToInsert.includes(`${item}`));
// Reinsert items at their new position.
const insertIndex = newMedia.findIndex((item) => `${item}` === afterID);
const insertIndex = newMedia.findIndex((item) => `${item}` === `${afterID}`);
newMedia.splice(insertIndex + 1, 0, ...itemIDsToInsert);
playlist.media = newMedia;

Expand Down

0 comments on commit 2f7c243

Please sign in to comment.