From b926605ab6ee7fe8c2f3d6a8297c05a3f1116896 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Sat, 8 Apr 2023 08:15:03 +0200 Subject: [PATCH] [BUGFIX] fill sidebar event triggered twice --- frontend/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/main.ts b/frontend/main.ts index 5714528..0f76e6e 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -105,7 +105,7 @@ function initSidebar() { triggerElement.addEventListener('click', (e) => { e.preventDefault(); - if(triggerElement.dataset.trigger === 'addTrip') { + if(triggerElement.dataset.trigger === 'addTrip' && !sidebar.isOpen) { initTripSidebar(triggerElement); }