Skip to content
Snippets Groups Projects
Commit a3e63e12 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '276-Loading-map-with-opened-plugin-crash-minerva' into 'development'

plugins must be loaded after the data is initialized

Closes #276

See merge request !215
parents 65b82709 11765d69
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!215plugins must be loaded after the data is initialized
Pipeline #93319 failed
......@@ -40,6 +40,18 @@ export const fetchInitialAppData = createAsyncThunk<
>('appInit/fetchInitialAppData', async ({ queryData }, { dispatch }): Promise<void> => {
dispatch(setProjectId({ queryData }));
/** Fetch all data required for rendering map */
await Promise.all([
dispatch(getConstant()),
dispatch(getConfiguration()),
dispatch(getConfigurationOptions()),
dispatch(getProjectById(PROJECT_ID)),
dispatch(getAllBackgroundsByProjectId(PROJECT_ID)),
dispatch(getAllPublicOverlaysByProjectId(PROJECT_ID)),
dispatch(getModels()),
]);
if (queryData.pluginsId) {
await dispatch(
getInitPlugins({
......@@ -56,17 +68,6 @@ export const fetchInitialAppData = createAsyncThunk<
}
}
/** Fetch all data required for rendering map */
await Promise.all([
dispatch(getConstant()),
dispatch(getConfiguration()),
dispatch(getConfigurationOptions()),
dispatch(getProjectById(PROJECT_ID)),
dispatch(getAllBackgroundsByProjectId(PROJECT_ID)),
dispatch(getAllPublicOverlaysByProjectId(PROJECT_ID)),
dispatch(getModels()),
]);
/** Set map properties to allow rendering. If map params (modelId,backgroundId,position) are not provided in query -> it will be set to map default */
await Promise.all([
dispatch(initMapSizeAndModelId({ queryData })),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment