Fix init issue for site (#50)
This commit is contained in:
1 parent
beb85b8ebd
commit
223e14222d
6 files changed
+57
-31
No files matched your search
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user