From ebaba5b90849869ff84924c1bcd887639b0febad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Tainon?= Date: Wed, 17 Apr 2024 17:57:37 +0200 Subject: [PATCH] Concept list could depend on base concept URL --- frontend/task/documentation/doc.ts | 2 +- frontend/task/libs/quickalgo_library.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/task/documentation/doc.ts b/frontend/task/documentation/doc.ts index a8e6d6a3..8d3e636f 100644 --- a/frontend/task/documentation/doc.ts +++ b/frontend/task/documentation/doc.ts @@ -206,7 +206,7 @@ function getConceptsFromLanguage(hasTaskInstructions: boolean, state: AppStore) if (DocumentationLanguage.C !== language) { const baseConcepts = window.getConceptViewerBaseConcepts(baseConceptUrl); // Take concepts from the library first - allConcepts = context.getConceptList(); + allConcepts = context.getConceptList(baseConceptUrl); // Add base concepts not in the library allConcepts = allConcepts.concat(baseConcepts.filter((concept) => allConcepts.find((c) => c.id === concept.id) === undefined)); // Fill library concepts with information from base concepts if needed diff --git a/frontend/task/libs/quickalgo_library.ts b/frontend/task/libs/quickalgo_library.ts index 538bd143..831ea029 100644 --- a/frontend/task/libs/quickalgo_library.ts +++ b/frontend/task/libs/quickalgo_library.ts @@ -148,7 +148,7 @@ export abstract class QuickAlgoLibrary { // Get the list of concepts // List can be defined either in context.conceptList, or by redefining this // function - getConceptList() { + getConceptList(baseConceptUrl?: string) { return this.conceptList || []; };