Fix access to missing Shuffle button

This commit is contained in:
Dmitry Lyzo 2023-05-24 19:34:46 +03:00
parent 8ffe7fec2f
commit 5c44b03b5f

View File

@ -86,7 +86,7 @@ export default function (view, params, tabContent, options) {
elem.addEventListener('click', onPreviousPageClick);
}
tabContent.querySelector('.btnShuffle').classList.toggle('hide', result.TotalRecordCount < 1);
tabContent.querySelector('.btnShuffle')?.classList.toggle('hide', result.TotalRecordCount < 1);
isLoading = false;
loading.hide();
@ -258,7 +258,7 @@ export default function (view, params, tabContent, options) {
itemsContainer.refreshItems();
});
tabElement.querySelector('.btnShuffle').addEventListener('click', shuffle);
tabElement.querySelector('.btnShuffle')?.addEventListener('click', shuffle);
};
let itemsContainer = tabContent.querySelector('.itemsContainer');