fix: stricter selector for sort

This commit is contained in:
Barış Soner Uşaklı
2023-12-23 17:58:03 -05:00
parent 563e03b6ae
commit a74b51415c

View File

@@ -12,8 +12,8 @@ define('sort', ['components'], function (components) {
currentSetting.find('i').addClass('fa-check'); currentSetting.find('i').addClass('fa-check');
$('body') $('body')
.off('click', '[component="thread/sort"] a') .off('click', '[component="thread/sort"] a[data-sort]')
.on('click', '[component="thread/sort"] a', function () { .on('click', '[component="thread/sort"] a[data-sort]', function () {
const newSetting = $(this).attr('data-sort'); const newSetting = $(this).attr('data-sort');
const urlParams = utils.params(); const urlParams = utils.params();
urlParams.sort = newSetting; urlParams.sort = newSetting;