Skip to content

Commit

Permalink
Fix JS (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
AymericJak committed May 15, 2023
1 parent ff84773 commit d59c9aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pod/podfile/static/podfile/js/filewidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ if (typeof loaded == "undefined") {

document.addEventListener("click", (e) => {
//if (!e.target.classList.contains("btn-delete-file")) return;
if (e.target.classList.contains("btn-delete-file") || e.target.parentNode.classList.contains("btn-delete-file")) {
if (e.target.classList.contains("btn-delete-file") || (e.target.parentNode && e.target.parentNode.classList.contains("btn-delete-file"))) {
var deleteConfirm = confirm(
gettext("Are you sure you want to delete this file?")
);
Expand Down

0 comments on commit d59c9aa

Please sign in to comment.