From 510327ac7324e88b879854414fa7a701c46a197a Mon Sep 17 00:00:00 2001 From: Alex <21365310+thealexparadox@users.noreply.github.com> Date: Sun, 26 Jul 2026 15:30:30 -0400 Subject: [PATCH] Update admin-bar.blade.php Fix null reference error for confirmationLink on pages without admin bar --- .../linkstack/modules/admin-bar.blade.php | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/resources/views/linkstack/modules/admin-bar.blade.php b/resources/views/linkstack/modules/admin-bar.blade.php index b662a2730..f21938d2f 100644 --- a/resources/views/linkstack/modules/admin-bar.blade.php +++ b/resources/views/linkstack/modules/admin-bar.blade.php @@ -130,23 +130,27 @@ function submitForm() { document.getElementById('logoutForm').submit(); } - - @if(auth()->user()->role != 'admin') - + var confirmationLink = document.getElementById("confirmationLink"); + if (confirmationLink) { + confirmationLink.addEventListener("click", function(event) { + event.preventDefault(); + showConfirmation(); + }); + } + @endif
@endif -@endif \ No newline at end of file +@endif