From fdb252c889a5c6a44fff82c016f96a4e239bb712 Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:27:54 +0100 Subject: [PATCH] refactor: dont trigger theme in maintenance mode --- resources/views/scripts/dark-theme-script.blade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/scripts/dark-theme-script.blade.php b/resources/views/scripts/dark-theme-script.blade.php index a68bf5c1..bc9a24ba 100644 --- a/resources/views/scripts/dark-theme-script.blade.php +++ b/resources/views/scripts/dark-theme-script.blade.php @@ -46,9 +46,11 @@ bubbles: true, })); - if (window.Livewire) { - Livewire.emit('themeChanged', _theme); - } + @unless (app()->isDownForMaintenance()) + if (window.Livewire) { + Livewire.emit('themeChanged', _theme); + } + @endunless } toggleTheme();