Skip to content

Commit

Permalink
action-list.js: Fix console error that [href] element is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Aug 11, 2023
1 parent 8120809 commit 693db79
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/js/action-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,15 @@
if (activeItems.length > 1) {
url = this.createMultiSelectUrl(activeItems);
} else {
url = activeItems[0].querySelector('[href]').getAttribute('href');
let anchor = activeItems[0].querySelector('[href]');
url = anchor ? anchor.href : null;
}
}

if (url === null) {
return;
}

this.isProcessingRequest = true;
clearTimeout(this.lastTimeoutId);
this.lastTimeoutId = setTimeout(() => {
Expand Down

0 comments on commit 693db79

Please sign in to comment.