diff --git a/icons.html b/icons.html
index 6a57ecee..c4a19f9e 100644
--- a/icons.html
+++ b/icons.html
@@ -6,7 +6,7 @@
brands/solid/facebook
brands/youtube-shorts-outline circle/exclamation-mark-big brands/youtube-shorts-outline circle/exclamation-mark-big circle/shopping-cart-pointer ellipsis-vertical
diff --git a/resources/views/scripts/dark-theme-script.blade.php b/resources/views/scripts/dark-theme-script.blade.php
index 137d1bcd..a92481e9 100644
--- a/resources/views/scripts/dark-theme-script.blade.php
+++ b/resources/views/scripts/dark-theme-script.blade.php
@@ -14,7 +14,10 @@
* Set the given theme ('light' or 'dark').
*/
document.addEventListener('setThemeMode', (e) => {
- localStorage.theme = e.detail.theme;
+ // The latest version of Livewire sends the details as an array.
+ // Handling both cases for backward compatibility.
+ theme = Array.isArray(e.detail) ? e.detail[0].theme : e.detail.theme;
+ localStorage.theme = theme;
toggleTheme();
});