From 18e6bbd6a0bb60b7f1137fab2dfb88ed7804a8ac Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Mon, 6 May 2024 15:05:53 -0400 Subject: [PATCH] 21364: added comment for lastQuery var Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- .../search-results-panel/search-results-middleware-service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts b/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts index 562b3126e8..866e148bcd 100644 --- a/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts +++ b/services/workbench2/src/store/search-results-panel/search-results-middleware-service.ts @@ -41,6 +41,9 @@ export class SearchResultsMiddlewareService extends DataExplorerMiddlewareServic const { cluster: clusterId } = getAdvancedDataFromQuery(searchValue); const sessions = getSearchSessions(clusterId, state.auth.sessions); const recentQueries = this.services.searchService.getRecentQueries(); + //the last query is compared to the current query to check if the value has changed + //once the search button is clicked, the value is pushed to the recentQueries array + //therefore, the last query is the second to last element in the array const lastQuery = recentQueries[recentQueries.length - 2]; if (searchValue.trim() === '') { -- 2.30.2