Fix setting default color mode in dev mode

Without this, the last_compiled_timestamp local storage never gets set because
it's always `null` until it gets set.
This commit is contained in:
Masen Furer 2025-01-10 09:05:38 -08:00
parent 427d7c56ab
commit 8ab7512926
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95

View File

@ -16,10 +16,7 @@ export default function RadixThemesColorModeProvider({ children }) {
if (isDevMode) {
const lastCompiledTimeInLocalStorage =
localStorage.getItem("last_compiled_time");
if (
lastCompiledTimeInLocalStorage &&
lastCompiledTimeInLocalStorage !== lastCompiledTimeStamp
) {
if (lastCompiledTimeInLocalStorage !== lastCompiledTimeStamp) {
// on app startup, make sure the application color mode is persisted correctly.
setTheme(defaultColorMode);
localStorage.setItem("last_compiled_time", lastCompiledTimeStamp);