Skip to content

Commit

Permalink
IBX-2129: Added guard if trash is empty (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Jan 29, 2022
1 parent 37f58f1 commit cc50b36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bundle/Resources/public/js/scripts/admin.trash.list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (global, doc, ibexa, React, ReactDOM, Translator) {
(function(global, doc, ibexa, React, ReactDOM, Translator) {
let getUsersTimeout;
const CLASS_SORTED_ASC = 'ibexa-table__sort-column--asc';
const CLASS_SORTED_DESC = 'ibexa-table__sort-column--desc';
Expand Down Expand Up @@ -253,6 +253,10 @@
if (sortedActiveField) {
const sortedFieldNode = doc.querySelector(`.ibexa-table__sort-column--${sortedActiveField}`);

if (!sortedFieldNode) {
return;
}

if (parseInt(sortedActiveDirection) === 1) {
sortedFieldNode.classList.add(CLASS_SORTED_ASC);
} else {
Expand Down

0 comments on commit cc50b36

Please sign in to comment.