Skip to content

Commit

Permalink
Take into account that the semantic query may arrive async (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Jul 29, 2021
1 parent 005cce7 commit c99f2ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/explorer/explorer-event-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ class ExplorerEventController {
}

resetSemanticSearch(model: SemanticQuery): SearchResultListView {
const query = modelToQuery(model.get('query'));
const items = new ItemGraph();
items.sparqlQuery(query);
model.when(
'query',
(model, query) => items.sparqlQuery(modelToQuery(query))
);
if (model.isNew()) model.save();
const collection = new FlatItemCollection(items);
const resultsView = new SearchResultListView({
Expand Down

0 comments on commit c99f2ed

Please sign in to comment.