mirror of https://github.com/halo-dev/halo-admin
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 https://github.com/halo-dev/halo/issues/3187 #### Special notes for your reviewer: 测试方式: 1. 在开发环境使用全新的数据库初始化。 2. 检查是否能够正常的访问主题管理页面。 #### Does this PR introduce a user-facing change? ```release-note None ```pull/836/head
parent
d51713ec27
commit
658a8ce4ee
|
@ -19,7 +19,9 @@ export const useThemeStore = defineStore("theme", () => {
|
|||
mute: true,
|
||||
});
|
||||
|
||||
activatedTheme.value = data;
|
||||
if (data) {
|
||||
activatedTheme.value = data;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Failed to fetch active theme", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue