Skip to content

Commit

Permalink
Fix no index crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
regorxxx committed Feb 19, 2023
1 parent 8fcfac8 commit 4c01b3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main/playlist_manager/playlist_manager_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,17 +988,17 @@ function _list(x, y, w, h) {
this.executeAction = (z, shortcut, bMultiple = !!this.indexes.length) => {
if (shortcut.key !== 'Multiple selection' && shortcut.key !== 'Multiple selection (range)' && bMultiple) {
this.indexes.forEach((zz) => {
const pls = this.data[zz];
if (pls.isAutoPlaylist && shortcut.key === 'Clone playlist in UI') {
const pls = typeof zz !== 'undefined' && zz !== -1 ? this.data[zz] : null;
if (pls && pls.isAutoPlaylist && shortcut.key === 'Clone playlist in UI') {
const remDupl = (pls.isAutoPlaylist && this.bRemoveDuplicatesAutoPls) || (pls.extension === '.xsp' && this.bRemoveDuplicatesSmartPls) ? this.removeDuplicatesAutoPls : [];
shortcut.func(zz, remDupl, this.bAdvTitle);
} else {
shortcut.func(zz);
}
});
} else {
const pls = this.data[z];
if (pls.isAutoPlaylist && shortcut.key === 'Clone playlist in UI') {
const pls = typeof z !== 'undefined' && z !== -1 ? this.data[z] : null;
if (pls && pls.isAutoPlaylist && shortcut.key === 'Clone playlist in UI') {
const remDupl = (pls.isAutoPlaylist && this.bRemoveDuplicatesAutoPls) || (pls.extension === '.xsp' && this.bRemoveDuplicatesSmartPls) ? this.removeDuplicatesAutoPls : [];
shortcut.func(z, remDupl, this.bAdvTitle);
} else {
Expand Down

0 comments on commit 4c01b3a

Please sign in to comment.