From 1ccc3f2c6f57e7af3d05c0ed040a9bef61840831 Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Sun, 7 May 2023 03:12:02 +0200 Subject: [PATCH] Fixing error in js. --- js-src/index.ts | 2 +- public/js/bundle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js-src/index.ts b/js-src/index.ts index 77a473d..3e93c66 100644 --- a/js-src/index.ts +++ b/js-src/index.ts @@ -13,7 +13,7 @@ window.onload = () => { } for (const table of tables) { - const header = document.querySelector('tr'); + const header = table.querySelector('tr'); if (header !== null) { header.setAttribute('data-sort-method', 'none') for (const th of header.querySelectorAll('th')) { diff --git a/public/js/bundle.js b/public/js/bundle.js index 1bbfc4f..951730f 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -16,7 +16,7 @@ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tablesort__WEBPACK_IMPORTED_MODULE_0__);\n\n\n\nwindow.onload = () => {\n const menu_expand = document.querySelector('a.menu-expand');\n const mobile_foldable = document.querySelector('nav.mobile-foldable');\n const tables = document.querySelectorAll('table')\n\n if (menu_expand !== null && mobile_foldable !== null) {\n menu_expand.addEventListener('click', () => {\n mobile_foldable.classList.toggle('show');\n });\n }\n\n for (const table of tables) {\n const header = document.querySelector('tr');\n if (header !== null) {\n header.setAttribute('data-sort-method', 'none')\n for (const th of header.querySelectorAll('th')) {\n th.setAttribute('data-sort-method', 'thead')\n }\n }\n tablesort__WEBPACK_IMPORTED_MODULE_0___default()(table)\n }\n};\n\n\n//# sourceURL=webpack://BurguillosInfo/./js-src/index.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tablesort__WEBPACK_IMPORTED_MODULE_0__);\n\n\n\nwindow.onload = () => {\n const menu_expand = document.querySelector('a.menu-expand');\n const mobile_foldable = document.querySelector('nav.mobile-foldable');\n const tables = document.querySelectorAll('table')\n\n if (menu_expand !== null && mobile_foldable !== null) {\n menu_expand.addEventListener('click', () => {\n mobile_foldable.classList.toggle('show');\n });\n }\n\n for (const table of tables) {\n const header = table.querySelector('tr');\n if (header !== null) {\n header.setAttribute('data-sort-method', 'none')\n for (const th of header.querySelectorAll('th')) {\n th.setAttribute('data-sort-method', 'thead')\n }\n }\n tablesort__WEBPACK_IMPORTED_MODULE_0___default()(table)\n }\n};\n\n\n//# sourceURL=webpack://BurguillosInfo/./js-src/index.ts?"); /***/ }),