From d36901aa2becf773731faa7a84d81b4aa08af207 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 24 Nov 2025 12:24:31 +0100 Subject: [PATCH] Refactor tab change logic in PoliticsView to simplify loading conditions - Updated the onTabChange method to remove unnecessary checks for existing data before loading current positions, open politics, and elections. - This change enhances the clarity of the method and ensures that data is always loaded when the respective tab is selected. --- frontend/src/views/falukant/PoliticsView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/falukant/PoliticsView.vue b/frontend/src/views/falukant/PoliticsView.vue index 4ff4a3f..4b6c318 100644 --- a/frontend/src/views/falukant/PoliticsView.vue +++ b/frontend/src/views/falukant/PoliticsView.vue @@ -206,13 +206,13 @@ export default { }, methods: { onTabChange(tab) { - if (tab === 'current' && !this.currentPositions.length) { + if (tab === 'current') { this.loadCurrentPositions(); } - if (tab === 'openPolitics' && !this.openPolitics.length) { + if (tab === 'openPolitics') { this.loadOpenPolitics(); } - if (tab === 'elections' && !this.elections.length) { + if (tab === 'elections') { this.loadElections(); } },