fix(editor): Run external hooks after settings have been initialized (#11423)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-10-29 11:37:10 +01:00 committed by GitHub
parent 7a8dafe990
commit 0ab24c814a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -8,7 +8,6 @@ import Modals from '@/components/Modals.vue';
import Telemetry from '@/components/Telemetry.vue';
import AskAssistantFloatingButton from '@/components/AskAssistant/AskAssistantFloatingButton.vue';
import { loadLanguage } from '@/plugins/i18n';
import { useExternalHooks } from '@/composables/useExternalHooks';
import { APP_MODALS_ELEMENT_ID, HIRING_BANNER, VIEWS } from '@/constants';
import { useRootStore } from '@/stores/root.store';
import { useAssistantStore } from '@/stores/assistant.store';
@ -46,7 +45,6 @@ watch(defaultLocale, (newLocale) => {
onMounted(async () => {
setAppZIndexes();
logHiringBanner();
void useExternalHooks().run('app.mount');
loading.value = false;
window.addEventListener('resize', updateGridWidth);
await updateGridWidth();

View file

@ -4,6 +4,7 @@ import { useRootStore } from '@/stores/root.store';
import { useSettingsStore } from '@/stores/settings.store';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useUsersStore } from '@/stores/users.store';
import { useExternalHooks } from '@/composables/useExternalHooks';
import { initializeCloudHooks } from '@/hooks/register';
import { useVersionsStore } from '@/stores/versions.store';
import { useProjectsStore } from '@/stores/projects.store';
@ -26,6 +27,9 @@ export async function initializeCore() {
const versionsStore = useVersionsStore();
await settingsStore.initialize();
void useExternalHooks().run('app.mount');
if (!settingsStore.isPreviewMode) {
await usersStore.initialize();