From afc2eec2cee34f0ed04ed6cb1ffdd369b6db855c Mon Sep 17 00:00:00 2001 From: sgrtye Date: Thu, 2 Nov 2023 17:22:31 +0000 Subject: [PATCH] fix description button now working error --- src/questionData/QuestionDataModule.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/questionData/QuestionDataModule.ts b/src/questionData/QuestionDataModule.ts index 2715ae7..fa549b0 100644 --- a/src/questionData/QuestionDataModule.ts +++ b/src/questionData/QuestionDataModule.ts @@ -92,7 +92,14 @@ export class QuestionDataProxy extends BABAProxy { } public getNodeById(id: string): TreeNodeModel | undefined { - return this.getfidMapQuestionData().get(id); + let map = this.getfidMapQuestionData(); + if (map.has(id)) { + return map.get(id); + } else if (map.has(parseInt(id))) { + return map.get(parseInt(id)); + } else { + return undefined; + } } public getNodeByQid(qid: string): TreeNodeModel | undefined {