diff --git a/app/src/app/analysis/analysis-selection-configs.ts b/app/src/app/analysis/analysis-selection-configs.ts index d55158b..06cf1fb 100644 --- a/app/src/app/analysis/analysis-selection-configs.ts +++ b/app/src/app/analysis/analysis-selection-configs.ts @@ -24,10 +24,11 @@ export const clearSelection = createAction("analysis/clearSelection"); export const selectAllThunk = createAsyncThunk('analysis/selectAllThunk', async (search: Search, thunkAPI) => { search.searchFunc(search.query, 1000); - + + let results = (thunkAPI.getState() as any).entities.analysis; while (!results || Object.keys(results).length === 0 || results.length === 0) { await new Promise(resolve => setTimeout(resolve, 10)); - var results = (thunkAPI.getState() as any).entities.analysis; + results = (thunkAPI.getState() as any).entities.analysis; } return results;