diff --git a/change/@acedatacloud-nexior-69cd4319-ab16-486f-8038-1a2b192a1c24.json b/change/@acedatacloud-nexior-69cd4319-ab16-486f-8038-1a2b192a1c24.json new file mode 100644 index 00000000..9f5f49c6 --- /dev/null +++ b/change/@acedatacloud-nexior-69cd4319-ab16-486f-8038-1a2b192a1c24.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix the site sync bug", + "packageName": "@acedatacloud/nexior", + "email": "germey@acedata.cloud", + "dependentChangeType": "patch" +} diff --git a/src/utils/initializer.ts b/src/utils/initializer.ts index b53b0922..f1bb922d 100644 --- a/src/utils/initializer.ts +++ b/src/utils/initializer.ts @@ -2,6 +2,7 @@ import { getCookie, setCookie } from 'typescript-cookie'; import favicon from '@/assets/images/favicon.ico'; import { getLocale } from '@/i18n'; import store from '@/store'; +import { log } from './log'; export const getDomain = () => { const host = window.location.hostname; @@ -133,8 +134,9 @@ export const initializeSite = async () => { await store.dispatch('getSite'); // after getSite, the site should have been set const site = store.state.site; + log(initializeSite, 'site', site); // if site is not set, try to initialize site - if (!site) { + if (!site?.origin) { await store.dispatch('initializeSite'); } };