Skip to content

Commit

Permalink
fix: topic thumbnail removal error
Browse files Browse the repository at this point in the history
Relaxed DOM selector to accommodate changed tpl
  • Loading branch information
julianlam committed Apr 11, 2023
1 parent 1ab7fdc commit 70f4d7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/src/modules/topicThumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ define('topicThumbs', [
return;
}

const id = ev.target.closest('.media[data-id]').getAttribute('data-id');
const path = ev.target.closest('.media[data-path]').getAttribute('data-path');
const id = ev.target.closest('[data-id]').getAttribute('data-id');
const path = ev.target.closest('[data-path]').getAttribute('data-path');
api.del(`/topics/${id}/thumbs`, {
path: path,
}).then(() => {
Expand Down

0 comments on commit 70f4d7f

Please sign in to comment.