From 9867df0a04406e85b64d5af851710166c9750397 Mon Sep 17 00:00:00 2001 From: tracer Date: Wed, 26 Oct 2022 12:33:38 +0200 Subject: [PATCH] sort only if table is actually displayed --- public/assets/js/functions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/assets/js/functions.js b/public/assets/js/functions.js index b98e5b8..6a2ecc8 100644 --- a/public/assets/js/functions.js +++ b/public/assets/js/functions.js @@ -133,6 +133,8 @@ function sortBy(column) { } document.addEventListener('DOMContentLoaded', () => { - console.log('loaded') - sortBy('last') + const table = document.getElementById('address_table') || false + if (table) { + sortBy('last') + } }) \ No newline at end of file