AiPBAND / gliobase

Glioblastoma multiforme (GBM) biomarker knowledge base
1 stars 1 forks source link

If click a evidence with no stage value (null) the website will crash #105

Closed zhangxiaoyu11 closed 5 years ago

zhangxiaoyu11 commented 5 years ago

If "sourceIds" or "species" is null the website will also crash. Just because of the following code: const stage = data.evidence.stage.map map function cannot deal will null

zhangxiaoyu11 commented 5 years ago

TypeError: Cannot read property 'map' of null children src/pages/Evidence.js:40

zhangxiaoyu11 commented 5 years ago

I fixed the bug related to the null value of stage and region. Please remember never pass a value that might be null to map function. Always check null value before use map(). After fixing the null value problem, there are still some evidence pages that cannot open. Please fully check the Evidence.js file. Some other bugs may still in it.