fix: apply initial DOM state from preferences store on load (no-flash in browser dev mode)

This commit is contained in:
2026-04-18 10:02:54 +01:00
parent b2d584f999
commit 0004433f2d

View File

@@ -100,6 +100,12 @@ function persistToSQLite(prefs) {
let preferences = $state(readFromDOM());
// Ensure data-theme and zone attributes are always present on the DOM, even
// when there is no Tauri webview injection script (e.g. browser dev mode).
if (typeof window !== 'undefined') {
applyToDOM(preferences);
}
export function getPreferences() {
return preferences;
}