safety coalesce

This commit is contained in:
bkimmel
2025-03-18 22:57:22 -04:00
parent 9634e1ce39
commit f2d6daa9fc
+1 -1
View File
@@ -36,7 +36,7 @@ export default function ThemeSwitcher({
onClick={toggleTheme}
aria-description={'Change current theme'}
>
<span data-label className="transition-all block absolute w-full mb-auto mt-auto ml-0 mr-0 text-xs left-0 -top-5 opacity-0 rounded-lg">{firstCharOfPreference.toLocaleUpperCase() + restOfPreference.join("")}</span>
<span data-label className="transition-all block absolute w-full mb-auto mt-auto ml-0 mr-0 text-xs left-0 -top-5 opacity-0 rounded-lg">{firstCharOfPreference.toLocaleUpperCase() + (restOfPreference ?? []).join("")}</span>
{themeIcons[preference]}
</button>
);