From 980a720842402d8e83d0fc28938447c40ca4952b Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Mon, 23 Sep 2024 13:00:54 +0200 Subject: [PATCH] Fix "Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')" --- .../linkstack/modules/admin-bar.blade.php | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/resources/views/linkstack/modules/admin-bar.blade.php b/resources/views/linkstack/modules/admin-bar.blade.php index a0352f4..b662a27 100644 --- a/resources/views/linkstack/modules/admin-bar.blade.php +++ b/resources/views/linkstack/modules/admin-bar.blade.php @@ -131,18 +131,20 @@ if(Auth::user()->id == $userinfo->id){ document.getElementById('logoutForm').submit(); } - + } + document.getElementById("confirmationLink").addEventListener("click", function(event) { + event.preventDefault(); + showConfirmation(); + }); + + @endif