diff --git a/public/app/features/explore/state/query.ts b/public/app/features/explore/state/query.ts index 7c89893f792..6439544764d 100644 --- a/public/app/features/explore/state/query.ts +++ b/public/app/features/explore/state/query.ts @@ -551,13 +551,11 @@ export const queryReducer = (state: ExploreItemState, action: AnyAction): Explor nextQueries.push(generateNewKeyAndAddRefIdIfMissing(query, nextQueries, i)); }); - const nextQueryKeys: string[] = nextQueries.map(query => query.key!); - return { ...state, queries: nextQueries, logsHighlighterExpressions: undefined, - queryKeys: nextQueryKeys, + queryKeys: getQueryKeys(nextQueries, state.datasourceInstance), }; }