Skip to content

Commit 0c04fb6

Browse files
authored
Merge pull request #263 from sgrtye/descriptionButtonFix
fix description button not working error
2 parents 6e17f59 + afc2eec commit 0c04fb6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/questionData/QuestionDataModule.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,14 @@ export class QuestionDataProxy extends BABAProxy {
9292
}
9393

9494
public getNodeById(id: string): TreeNodeModel | undefined {
95-
return this.getfidMapQuestionData().get(id);
95+
let map = this.getfidMapQuestionData();
96+
if (map.has(id)) {
97+
return map.get(id);
98+
} else if (map.has(parseInt(id))) {
99+
return map.get(parseInt(id));
100+
} else {
101+
return undefined;
102+
}
96103
}
97104

98105
public getNodeByQid(qid: string): TreeNodeModel | undefined {

0 commit comments

Comments
 (0)