Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 658a8ce

Browse files
authored
fix: theme page cannot be opened after the development environment is initialized (#833)
#### What type of PR is this? /kind bug #### What this PR does / why we need it: 修复在开发环境下首次初始化后,没有加载默认主题的情况下无法访问主题管理页面的问题。 #### Which issue(s) this PR fixes: Fixes halo-dev/halo#3187 #### Special notes for your reviewer: 测试方式: 1. 在开发环境使用全新的数据库初始化。 2. 检查是否能够正常的访问主题管理页面。 #### Does this PR introduce a user-facing change? ```release-note None ```
1 parent d51713e commit 658a8ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stores/theme.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export const useThemeStore = defineStore("theme", () => {
1919
mute: true,
2020
});
2121

22-
activatedTheme.value = data;
22+
if (data) {
23+
activatedTheme.value = data;
24+
}
2325
} catch (e) {
2426
console.error("Failed to fetch active theme", e);
2527
}

0 commit comments

Comments
 (0)