Skip to content

Commit

Permalink
fix(hashcode-placement): fixed where the queryID is being generated b…
Browse files Browse the repository at this point in the history
…ased on the query text and renamed var to align with realistic output
  • Loading branch information
asalem1 committed Jun 18, 2020
1 parent 1199c47 commit a441bf9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/src/views/actions/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const setQueryResultsByQueryID = (queryID: string) => (
): Promise<void> => {
try {
const state = getState()
const files = state.queryCache.queryResultsByQueryID[hashCode(queryID)]
const files = state.queryCache.queryResultsByQueryID[queryID]
if (files) {
dispatch(setQueryResults(RemoteDataState.Done, files, null, null))
return
Expand All @@ -150,7 +150,8 @@ export const setQueryResultsForCell = (
const state = getState()
const {view} = getActiveTimeMachine(state)
const queries = view.properties.queries.filter(({text}) => !!text.trim())
const queryID = get(queries, '[0].text', '')
const queryText = get(queries, '[0].text', '')
const queryID = hashCode(queryText)
if (queryID) {
dispatch(setQueryResultsByQueryID(queryID))
return
Expand Down

0 comments on commit a441bf9

Please sign in to comment.