Fix init issue for site (#50)

This commit is contained in:
AceDataCloud committed 2024-06-17 03:28:39 +00:00
1 parent beb85b8ebd
commit 223e14222d
6 files changed
+57 -31

No files matched your search

+7 -1
View File
@@ -130,5 +130,11 @@ export const initializeFavicon = async () => {
* Need to initialize site before render contents
*/
export const initializeSite = async () => {
await store.dispatch('initializeSite');
await store.dispatch('getSite');
// after getSite, the site should have been set
const site = store.state.site;
// if site is not set, try to initialize site
if (!site) {
await store.dispatch('initializeSite');
}
};