From 554b7c600ad1409d0cc12517a8ffbe78dbba8619 Mon Sep 17 00:00:00 2001 From: nod_ Date: Tue, 7 Jan 2025 15:17:51 +0100 Subject: [PATCH] =?UTF-8?q?Issue=20#3496541=20by=20jurgenhaas,=20grimreape?= =?UTF-8?q?r,=20larowlan:=20Error=20when=20navigation=20JS=E2=80=AFis=20lo?= =?UTF-8?q?aded=20for=20anonymous=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/modules/navigation/js/admin-toolbar-wrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/navigation/js/admin-toolbar-wrapper.js b/core/modules/navigation/js/admin-toolbar-wrapper.js index 028e74ac7de..fa5403a3363 100644 --- a/core/modules/navigation/js/admin-toolbar-wrapper.js +++ b/core/modules/navigation/js/admin-toolbar-wrapper.js @@ -68,7 +68,7 @@ newState ? 'locked' : 'unlocked', ); - doc.querySelector('.admin-toolbar').dispatchEvent( + doc.querySelector('.admin-toolbar')?.dispatchEvent( new CustomEvent(SIDEBAR_CONTENT_EVENT, { detail: { state: newState,