diff --git a/resources/public/js/scripts.js b/resources/public/js/scripts.js index 6052112..85aff8f 100644 --- a/resources/public/js/scripts.js +++ b/resources/public/js/scripts.js @@ -227,7 +227,7 @@ document.addEventListener('DOMContentLoaded', function () { } function flipSortDir(dir) { - return (dir || 'asc') == 'asc' ? 'desc' : 'asc' + return (dir || 'asc') === 'asc' ? 'desc' : 'asc' } function clearSortAttributes(tbl) { @@ -240,7 +240,7 @@ document.addEventListener('DOMContentLoaded', function () { console.debug(tbl, ix, event) const sortDir = event.target.getAttribute('data-sort') || 'asc' - const sortMod = sortDir == 'asc' ? 1 : -1; + const sortMod = sortDir === 'asc' ? -1 : 1; const rows = tblRows(tbl) const newTbody = document.createElement('tbody')