fix: topic thumbnail removal error

Relaxed DOM selector to accommodate changed tpl
This commit is contained in:
Julian Lam
2023-04-11 13:46:12 -04:00
parent 1ab7fdc81e
commit 70f4d7f099

View File

@@ -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(() => {