瀏覽代碼

Unnecessary parentheses

Piotr Czajkowski 3 年之前
父節點
當前提交
9ad040b100
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      static/processResults.js

+ 2 - 2
static/processResults.js

@@ -49,7 +49,7 @@ app.comparer = (idx, asc) => (a, b) => ((v1, v2) =>
 
 app.sortTable = function() {
 	// borrowed from https://stackoverflow.com/a/49041392/7342859
-	document.querySelectorAll('th').forEach(th => th.addEventListener('click', (() => {
+	document.querySelectorAll('th').forEach(th => th.addEventListener('click', () => {
 		const table = document.getElementById("dataRows");
 		Array.from(table.querySelectorAll('tr'))
 			.sort(app.comparer(Array.from(th.parentNode.children).indexOf(th), this.asc = !this.asc))
@@ -64,6 +64,6 @@ app.sortTable = function() {
 				child.textContent = child.textContent.replace(app.sorted, "");
 			}
 		});
-	})));
+	}));
 
 };